/[openfoncier]/trunk/obj/om_dbform.class.php
ViewVC logotype

Diff of /trunk/obj/om_dbform.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1540 by fmichon, Thu Mar 21 06:50:50 2013 UTC revision 1548 by fmichon, Thu Mar 21 17:53:44 2013 UTC
# Line 697  class om_dbform extends dbForm { Line 697  class om_dbform extends dbForm {
697              $form->setSelect($field, $contenu);              $form->setSelect($field, $contenu);
698          }          }
699      }      }
700    
701        // {{{ SURCHARGES DES LIBELLES DES BOUTONS
702    
703                           /**
704         * Cette methode permet d'afficher le bouton de validation du formulaire
705         *
706         * @param integer $maj Mode de mise a jour
707         * @return void
708         */
709        function bouton($maj) {
710    
711            if (!$this->correct) {
712                //
713                if ($maj == 2) {
714                    $bouton = _("Supprimer");
715                } else {
716                    if ($maj == 1) {
717                        $bouton = _("Modifier");
718                    } else {
719                        $bouton = _("Ajouter");
720                    }
721                }
722                ////
723                //$bouton .= " "._("l'enregistrement de la table")." :";
724                //$bouton .= " '"._($this->table)."'";
725                //
726                $params = array(
727                    "value" => $bouton,
728                    "class" => "btn btn-primary",
729                );
730                //
731                $this->f->layout->display_form_button($params);
732            }
733    
734        }
735    
736        /**
737         *
738         */
739        function boutonsousformulaire($datasubmit, $maj, $val=null) {
740    
741            if (!$this->correct) {
742                //
743                switch ($maj) {
744                    case 0:
745                        $bouton = _("Ajouter");
746                        break;
747                    case 1:
748                        $bouton = _("Modifier");
749                        break;
750                    case 2:
751                        $bouton = _("Supprimer");
752                        break;
753                }
754                ////
755                //$bouton .= " "._("l'enregistrement de la table")." :";
756                //$bouton .= " '"._($this->table)."'";
757                //
758                $params = array(
759                    "class" => "",
760                    "value" => $bouton,
761                    "onclick" => "affichersform('".get_class($this)."', '$datasubmit', this.form);return false;",
762                );
763                //
764                $this->f->layout->display_form_button($params);
765            }
766    
767        }
768        // }}}
769  }  }
770    
771  ?>  ?>

Legend:
Removed from v.1540  
changed lines
  Added in v.1548

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26