diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 949cdd788..5e881a726 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -67,7 +67,7 @@ function input () * * \return string value of the attribute */ - function GetAttribut() { + function getAttribut() { $sql="select * from jnt_fic_attr ". " natural join attr_def where fd_id=".$this->id. " order by jnt_order"; diff --git a/include/client_card.inc.php b/include/client_card.inc.php index f57d0fd44..2a3147b11 100644 --- a/include/client_card.inc.php +++ b/include/client_card.inc.php @@ -33,10 +33,7 @@ echo ICard::ipopup('ipopcard'); /* $sub_action = sb = detail */ /* $cn database conx */ -$return=new IAction(); -$return->name='retour'; -$return->label='Retour'; -$return->value='?p_action=client&'.$str_dossier; +$return= HtmlInput::button_anchor('Retour','?p_action=client&'.$str_dossier); $root="?p_action=client&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier; $ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: ''; switch ($ss_action) { diff --git a/include/fiche.inc.php b/include/fiche.inc.php index 14964b843..ca9168606 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -29,20 +29,10 @@ require_once('class_database.php'); include_once ("user_menu.php"); require_once('class_dossier.php'); require_once('class_ipopup.php'); -echo js_include('accounting_item.js'); -echo js_include('prototype.js'); -echo js_include('scriptaculous.js'); -echo js_include('effects.js'); -echo js_include('controls.js'); -echo js_include('dragdrop.js'); -echo JS_CARD; -echo JS_INFOBULLE; echo IPoste::ipopup('ipop_account'); $gDossier=dossier::id(); $str_dossier=dossier::get(); -echo js_include('accounting_item.js'); -echo JS_AJAX_FICHE; $pop_tva=new IPopup('popup_tva'); $pop_tva->title=_('Choix TVA'); @@ -115,7 +105,7 @@ function ShowFicheDefInput($p_fiche_def) $r.=HtmlInput::submit('remove_cat',_('Effacer cette catégorie'),'onclick="return confirm(\''._('Vous confirmez ?').'\')"'); // if there is nothing to remove then hide the button if ( strpos ($r,"chk_remove") != 0 ) { - $r.=HtmlInput::submit('remove_line',_("Enleve les éléments cochés") ); + $r.=HtmlInput::submit('remove_line',_("Enleve les éléments cochés"),"onclick=\"return confirm('Vous confirmez?')\"" ); } $r.= ""; $r.="

"._("Attention : il n'y aura pas de demande de confirmation pour enlever les @@ -197,12 +187,14 @@ if ( isset ($_POST['remove_line']) ) $r.= "

Pas d'accès

"; else { - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); - // Insert Line - // demander confirmation - - $fiche_def->RemoveAttribut($_REQUEST['chk_remove']); - $r.=ShowFicheDefInput($fiche_def); + if ( isset($_REQUEST['chk_remove'])) { + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); + // Insert Line + // demander confirmation + + $fiche_def->RemoveAttribut($_REQUEST['chk_remove']); + $r.=ShowFicheDefInput($fiche_def); + } } $r.= '';