After cloning a profil, show it and select the default tab
This commit is contained in:
parent
30f6481294
commit
2c7cf20275
1 changed files with 9 additions and 1 deletions
|
|
@ -145,7 +145,10 @@ if (isset($_POST['save_name']))
|
|||
//************************************
|
||||
if (isset($_POST['clone']))
|
||||
{
|
||||
extract($_POST);
|
||||
$p_id = HtmlInput::default_value_post("p_id", 0);
|
||||
if ( $p_id == 0 || isNumber($p_id) == 0) {
|
||||
throw new Exception (_('Argument'));
|
||||
}
|
||||
try
|
||||
{
|
||||
$cn->start();
|
||||
|
|
@ -167,12 +170,17 @@ if (isset($_POST['clone']))
|
|||
where pm_id_dep is null and p_id=$1",array($new_id));
|
||||
$cn->commit();
|
||||
$p_id=$new_id;
|
||||
$_POST['p_id'] = $new_id;
|
||||
$_GET['p_id'] = $new_id;
|
||||
$_REQUEST['p_id'] = $new_id;
|
||||
$_POST['tab']="profile_gen_div";
|
||||
}
|
||||
catch (Exception $exc)
|
||||
{
|
||||
echo alert($exc->getMessage());
|
||||
$cn->rollback();
|
||||
}
|
||||
|
||||
}
|
||||
//************************************
|
||||
// Delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue