diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2004-12-23 22:00:02 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2004-12-23 22:00:02 +0000 |
commit | e1e7a4256f454544e4fb718f7d207caa35aec852 (patch) | |
tree | e5e1417b599f740721ebd832756f3a1cffd597a9 /usr | |
parent | 5f883afd0b64029c06a1a8cdc44684377552fbbf (diff) | |
download | pfsense-e1e7a4256f454544e4fb718f7d207caa35aec852.zip pfsense-e1e7a4256f454544e4fb718f7d207caa35aec852.tar.gz |
Add stepsubmitbeforesave tag which will process text before saving.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/wizard.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index 553f817..c67f13b 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -56,6 +56,10 @@ $title = $pkg['step'][$stepid]['title']; $description = $pkg['step'][$stepid]['description']; $totalsteps = $pkg['totalsteps']; +if($pkg['step'][$stepid]['stepsubmitbeforesave']) { + eval($pkg['step'][$stepid]['stepsubmitbeforesave']); +} + if ($_POST) { foreach ($pkg['step'][$stepid]['fields']['field'] as $field) { if($field['bindstofield'] <> "" and $field['type'] <> "submit") { @@ -69,9 +73,9 @@ if ($_POST) { if($field['bindstofield']) update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum); } - if($pkg['step'][$stepid]['stepsubmitphpaction']) { // run custom php code embedded in xml config. - eval($pkg['step'][$stepid]['stepsubmitphpaction']); + if($pkg['step'][$stepid]['stepsubmitphpaction']) { + eval($pkg['step'][$stepid]['stepsubmitphpaction']); } write_config(); } |