mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Added callback to print forms
Former-commit-id: e8f113710158278cb61f494a6c0111e1615ab877
This commit is contained in:
parent
2c3357ac64
commit
86d57f2654
@ -473,6 +473,8 @@ class Wizard
|
|||||||
$form = $data['form'];
|
$form = $data['form'];
|
||||||
$inputs = $data['inputs'];
|
$inputs = $data['inputs'];
|
||||||
$js = $data['js'];
|
$js = $data['js'];
|
||||||
|
$cb_function = $data['cb_function'];
|
||||||
|
$cb_args = $data['cb_args'];
|
||||||
|
|
||||||
$output = '<form enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method'];
|
$output = '<form enctype="'.$form['enctype'].'" action="'.$form['action'].'" method="'.$form['method'];
|
||||||
$output .= '" '.$form['extra'].'>';
|
$output .= '" '.$form['extra'].'>';
|
||||||
@ -483,6 +485,17 @@ class Wizard
|
|||||||
$output .= $this->printBlock($input, true);
|
$output .= $this->printBlock($input, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (isset($cb_function) === true) {
|
||||||
|
call_user_func(
|
||||||
|
$cb_function,
|
||||||
|
(isset($cb_args) === true) ? $cb_args : []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
error_log('Error executing wizard callback: ', $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$output .= '</ul>';
|
$output .= '</ul>';
|
||||||
$output .= '</form>';
|
$output .= '</form>';
|
||||||
$output .= '<script>'.$js.'</script>';
|
$output .= '<script>'.$js.'</script>';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user