Ajout variables oubliées dans runIf ... function
This commit is contained in:
parent
b22ace0eb3
commit
5e78c10858
@ -27,7 +27,7 @@ $selected_cat = $eqmt_requested->category_id;
|
||||
$csrf_key = 'edit_equipment_' . $eqmt_requested->id;
|
||||
|
||||
$form->runIf (f('save') && !$form->hasErrors(),
|
||||
function () use ($eqmt, $eqmt_requested)
|
||||
function () use ($eqmt, $eqmt_requested, $form)
|
||||
{
|
||||
// try to edit equipment selected and if error catched add it in form
|
||||
try
|
||||
|
@ -23,7 +23,7 @@ $selected_kind = $kinds[0];
|
||||
$csrf_key = 'add_output';
|
||||
|
||||
$form->runIf(f('save') && !$form->hasErrors(),
|
||||
function() use ($mvt, $eqmt)
|
||||
function() use ($mvt, $eqmt, $form)
|
||||
{
|
||||
$eqmt_id = f('equipment_id');
|
||||
$eqmt_number = (int) f('equipment_number');
|
||||
|
@ -20,7 +20,7 @@ if (!$output_to_delete)
|
||||
$csrf_key = 'delete_output_' . $output_to_delete->id;
|
||||
|
||||
$form->runIf (f('delete') && !$form->hasErrors(),
|
||||
function () use ($mvt)
|
||||
function () use ($mvt, $output_to_delete)
|
||||
{
|
||||
// delete the movement required
|
||||
$mvt->delete($output_to_delete->id);
|
||||
|
Loading…
Reference in New Issue
Block a user