Ajout champ note à la fiche client
This commit is contained in:
parent
4ee3f65d0a
commit
950a6b8b2c
8 changed files with 86 additions and 35 deletions
|
|
@ -17,27 +17,28 @@ if (!$c)
|
|||
}
|
||||
|
||||
$form->runIf(f('save') && !$form->hasErrors(),
|
||||
function () use ($client, $id, $form)
|
||||
{
|
||||
try
|
||||
{
|
||||
$r = $client->edit($id,[
|
||||
'nom' => f('nom'),
|
||||
'adresse' => f('adresse'),
|
||||
'code_postal' => f('code_postal'),
|
||||
'ville' => f('ville'),
|
||||
'siret' => f('siret'),
|
||||
'telephone' => f('telephone'),
|
||||
'email' => f('email')
|
||||
]);
|
||||
function () use ($client, $id, $form)
|
||||
{
|
||||
try
|
||||
{
|
||||
$r = $client->edit($id,[
|
||||
'nom' => f('nom'),
|
||||
'adresse' => f('adresse'),
|
||||
'code_postal' => f('code_postal'),
|
||||
'ville' => f('ville'),
|
||||
'siret' => f('siret'),
|
||||
'telephone' => f('telephone'),
|
||||
'email' => f('email'),
|
||||
'note' => f('note')
|
||||
]);
|
||||
|
||||
$r ? Utils::redirect(PLUGIN_ADMIN_URL . 'client.php?id='.(int)$id):'';
|
||||
}
|
||||
catch (UserException $e)
|
||||
{
|
||||
$form->addError($e->getMessage());
|
||||
}
|
||||
}, 'edit_client');
|
||||
$r ? Utils::redirect(PLUGIN_ADMIN_URL . 'client.php?id='.(int)$id):'';
|
||||
}
|
||||
catch (UserException $e)
|
||||
{
|
||||
$form->addError($e->getMessage());
|
||||
}
|
||||
}, 'edit_client');
|
||||
|
||||
|
||||
$tpl->assign('client', $c);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ $form->runIf(f('add') && !$form->hasErrors(),
|
|||
'ville' => f('ville'),
|
||||
'siret' => f('siret'),
|
||||
'telephone' => f('telephone'),
|
||||
'email' => f('email')
|
||||
'email' => f('email'),
|
||||
'note' => f('note')
|
||||
]);
|
||||
|
||||
$id ? Utils::redirect(PLUGIN_ADMIN_URL . 'client.php?id='.(int)$id):'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue