noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/03: Bug : Cannot add a new category of car


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/03: Bug : Cannot add a new category of cards
Date: Fri, 21 Aug 2015 15:51:28 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit ff9bd15d472489432ce169860d14996699f75266
Author: Dany De Bontridder <address@hidden>
Date:   Thu Aug 20 10:27:50 2015 +0200

    Bug : Cannot add a new category of cards
---
 html/ajax_card.php                    |    3 ++-
 include/class_fiche_def.php           |    6 ++++++
 include/template/category_of_card.php |    6 +++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/html/ajax_card.php b/html/ajax_card.php
index f3880ee..7c09553 100644
--- a/html/ajax_card.php
+++ b/html/ajax_card.php
@@ -522,7 +522,8 @@ case 'scc':
         {
             $array=array("FICHE_REF"=>$cat,
                          "nom_mod"=>$_GET['nom_mod'],
-                         "class_base"=>$_GET['class_base']);
+                         "class_base"=>$_GET['class_base'],
+                          "fd_description"=>$_GET['fd_description']);
             if ( isset ($_POST['create'])) $array['create']=1;
             $catcard=new Fiche_Def($cn);
             if ( $catcard->Add($array) == -1)
diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php
index c2565fd..4f2356b 100644
--- a/include/class_fiche_def.php
+++ b/include/class_fiche_def.php
@@ -193,6 +193,7 @@ $order
      *        index FICHE_REF
      *              nom_mod
      *              class_base
+     *              fd_description
      */
     function Add($array)
     {
@@ -200,6 +201,11 @@ $order
         {
             ${"p_$key"}=$element;
         }
+        
+        // If there is no description then add a empty one
+        if ( ! isset ($p_fd_description)) {
+            $p_fd_description="";
+        }
         // Format correctly the name of the cat. of card
         $p_nom_mod=sql_string($p_nom_mod);
 
diff --git a/include/template/category_of_card.php 
b/include/template/category_of_card.php
index d9d0c45..4aa9bd4 100644
--- a/include/template/category_of_card.php
+++ b/include/template/category_of_card.php
@@ -3,7 +3,7 @@
 //see licence.txt
 ?>
 <?php 
-$html=HtmlInput::title_box("Ajout d'une catégorie ".$msg, $ctl);
+$html=HtmlInput::title_box(_("Ajout d'une catégorie ").$msg, $ctl);
 ?>
 
 <div class="content">
@@ -24,6 +24,10 @@ $html=HtmlInput::title_box("Ajout d'une catégorie ".$msg, 
$ctl);
 </TD>
 <td><span id="class_base_label"></span></td>
 </TR>
+<tr>
+    <td> <?php echo _('Description')?> </td>
+    <td> <input type="text" class="input_text" name="fd_description" 
style="width: 100%"></td>
+</tr>
 <TR>
    <TD> <INPUT TYPE="CHECKBOX" NAME="create" UNCHECKED><?php echo _('Création 
automatique du poste comptable')?></TD>
 </TR>



reply via email to

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