phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r422 - in trunk/rapport_avance: . include


From: phpcompta-dev
Subject: [Phpcompta-dev] r422 - in trunk/rapport_avance: . include
Date: Sun, 30 Sep 2012 03:41:52 +0200 (CEST)

Author: danydb
Date: 2012-09-30 03:41:51 +0200 (Sun, 30 Sep 2012)
New Revision: 422

Modified:
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/include/formulaire.inc.php
Log:
new : delete a form

Modified: trunk/rapport_avance/ajax.php
===================================================================
--- trunk/rapport_avance/ajax.php       2012-09-30 01:40:56 UTC (rev 421)
+++ trunk/rapport_avance/ajax.php       2012-09-30 01:41:51 UTC (rev 422)
@@ -17,6 +17,10 @@
                echo '<form method="POST" class="print">';
                $form->input_formulaire();
                $form->input_definition();
+               echo '<p>';
+               $delete = new ICheckBox('delete');
+               echo "Cochez la case pour effacer ce formulaire " . 
$delete->input();
+               echo '</p>';
                echo HtmlInput::submit('form_def_sub', 'Sauve');
                echo '</form>';
                break;
@@ -88,7 +92,7 @@
                $form->input_parameter();
                break;
 
-       
/******************************************************************************************************************
+       /*       * 
****************************************************************************************************************
         * Montre un écran pour ajouter une ligne de formulaire dans les 
paramètre de formulaires
         */
        case 'add_param_detail':
@@ -110,7 +114,7 @@
        // Delete un formulaire_param_detail
        
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        case 'delete_param_detail':
-               $cn->exec_sql("delete from 
rapport_advanced.formulaire_param_detail where fp_id=$1",array($fp_id));
+               $cn->exec_sql("delete from 
rapport_advanced.formulaire_param_detail where fp_id=$1", array($fp_id));
                break;
        
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // Display a saved declaration from history
@@ -122,10 +126,9 @@
        // Delete a saved declaration (from history)
        
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        case 'rapav_declaration_delete':
-               $cn->exec_sql("delete from rapport_advanced.declaration where 
d_id=$1",array($_GET['d_id']));
+               $cn->exec_sql("delete from rapport_advanced.declaration where 
d_id=$1", array($_GET['d_id']));
                break;
        default:
                break;
-
 }
 ?>

Modified: trunk/rapport_avance/include/formulaire.inc.php
===================================================================
--- trunk/rapport_avance/include/formulaire.inc.php     2012-09-30 01:40:56 UTC 
(rev 421)
+++ trunk/rapport_avance/include/formulaire.inc.php     2012-09-30 01:41:51 UTC 
(rev 422)
@@ -29,7 +29,15 @@
 require_once 'class_rapav_formulaire.php';
 if ( isset($_POST['form_def_sub']))
 {
-       RAPAV_formulaire::save_definition($_POST);
+       if (isset($_POST['delete']))
+       {
+               $cn->exec_sql('delete from rapport_advanced.formulaire where 
f_id=$1',array($_POST['f_id']));
+       }
+       else
+       {
+               RAPAV_formulaire::save_definition($_POST);
+
+       }
 }
 if (isset ($_POST['add_form']))
 {



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]