Rewriting Module Template Category of card
This commit is contained in:
parent
74574e07c7
commit
db048d3c54
7 changed files with 238 additions and 160 deletions
|
|
@ -20,68 +20,18 @@
|
|||
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
||||
require_once NOALYSS_INCLUDE.'/lib/ihidden.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/fiche_def.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/class/template_card_category.class.php';
|
||||
|
||||
/*! \file
|
||||
* \brief Let customise the fiche_def_ref for the user
|
||||
/*!
|
||||
* @file
|
||||
* @brief Let customise the fiche_def_ref for the user
|
||||
*/
|
||||
echo '<div class="content">';
|
||||
// record change
|
||||
if ( isset ($_POST['confirm_mod']))
|
||||
{
|
||||
extract ($_POST);
|
||||
$update=new Fiche_Def_Ref($cn);
|
||||
$update->frd_id=sql_string($frd_id);
|
||||
$update->frd_text=sql_string($frd_text);
|
||||
$update->frd_class_base=sql_string($frd_class_base);
|
||||
$update->Save();
|
||||
}
|
||||
// Load All Fiche_def
|
||||
$fiche_def=new Fiche_Def_Ref($cn);
|
||||
$all=$fiche_def->LoadAll();
|
||||
|
||||
// Display Them
|
||||
echo '<table align="left">';
|
||||
for ($i=0;$i<sizeof($all);$i++)
|
||||
{
|
||||
echo '<TR>';
|
||||
echo $all[$i]->Display();
|
||||
echo "<TD>";
|
||||
echo '<form method="post">';
|
||||
$w=new IHidden();
|
||||
echo $w->input('idx',$all[$i]->frd_id);
|
||||
echo HtmlInput::submit('mod','modifie');
|
||||
echo $w->input($_REQUEST['ac'],'ac');
|
||||
//echo $w->input($sa,'sa');
|
||||
echo "</form>";
|
||||
echo "</TD>";
|
||||
echo '</TR>';
|
||||
}
|
||||
echo "</table>";
|
||||
// modify input
|
||||
if ( isset ($_POST['mod']) )
|
||||
{
|
||||
extract ($_POST);
|
||||
echo '<div style="float:left;padding:2%">';
|
||||
echo _("Voulez-vous modifier ?");
|
||||
echo "<br><font color=\"red\"> ";
|
||||
echo _("Attention, ne changer pas la signification de ce poste.");
|
||||
echo hi(_("par exemple ne pas changer Client par fournisseur"))."<br>";
|
||||
echo _("sinon le programme fonctionnera mal, ".
|
||||
"utiliser uniquement des chiffres pour la classe de base ou rien")."</font>";
|
||||
|
||||
$mod=new Fiche_Def_Ref($cn);
|
||||
$mod->frd_id=$idx;
|
||||
$mod->Get();
|
||||
echo '<form method="post">';
|
||||
echo '<ul style="list-style-type:none"';
|
||||
echo $mod->Input();
|
||||
echo "</ul>";
|
||||
$w=new IHidden();
|
||||
echo $w->input('ac',$_REQUEST['ac']);
|
||||
// echo $w->input('sa',$sa);
|
||||
echo HtmlInput::submit('confirm_mod' ,'Confirme');
|
||||
echo HtmlInput::submit('no','Cancel');
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
$fiche_def_ref=new Fiche_def_ref_SQL($cn);
|
||||
$cat=new Template_Card_Category($fiche_def_ref);
|
||||
$cat->set_callback("ajax_misc.php");
|
||||
$cat->add_json_param("gDossier", Dossier::id());
|
||||
$cat->add_json_param("op", "template_cat_card");
|
||||
$cat->create_js_script();
|
||||
$cat->display_table();
|
||||
echo "</div>";
|
||||
Loading…
Add table
Add a link
Reference in a new issue