parent
534b59edac
commit
b777353054
3 changed files with 38 additions and 9 deletions
|
|
@ -62,21 +62,28 @@ if ( isset ($_POST['remove_line']))
|
|||
/*******************************************************************************************/
|
||||
if ( isset ($_POST['remove_cat']))
|
||||
{
|
||||
$fd_id=new Fiche_Def($cn,$_POST['fd_id']);
|
||||
$remains=$fd_id->remove();
|
||||
if ( $remains != 0 )
|
||||
/* some card are not removed because it is used */
|
||||
alert(_('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n".
|
||||
'Les fiches non utilisées ont cependant été effacées'));
|
||||
$post_id=HtmlInput::default_value_post('fd_id', 0);
|
||||
if ($post_id == 0 || $post_id >= 500000)
|
||||
{
|
||||
alert(_('Impossible d\'enlever cette catégorie'));
|
||||
} else {
|
||||
$fd_id=new Fiche_Def($cn,$post_id);
|
||||
$remains=$fd_id->remove();
|
||||
if ( $remains != 0 ) {
|
||||
/* some card are not removed because it is used */
|
||||
alert(_('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n".
|
||||
'Les fiches non utilisées ont cependant été effacées'));
|
||||
}
|
||||
}
|
||||
}
|
||||
/*******************************************************************************************/
|
||||
// Change some basis info
|
||||
/*******************************************************************************************/
|
||||
if ( isset ($_POST['change_name']))
|
||||
{
|
||||
if (isset ($_REQUEST['label']) )
|
||||
if (isset ($_REQUEST['label']) )
|
||||
{
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
$fiche_def->SaveLabel($_REQUEST['label']);
|
||||
if ( isset($_REQUEST['create']))
|
||||
{
|
||||
|
|
@ -87,7 +94,7 @@ if ( isset ($_POST['change_name']))
|
|||
$fiche_def->set_autocreate(false);
|
||||
}
|
||||
$fiche_def->save_class_base($_REQUEST['class_base']);
|
||||
$fiche_def->save_description($_REQUEST['fd_description']);
|
||||
$fiche_def->save_description($_REQUEST['fd_description']);
|
||||
|
||||
}
|
||||
echo $fiche_def->input_detail();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue