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 |
?> |
?> |