Commit a046bff7 authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#1947 - Unchecking all PHP options in Limits interface causes problem...

Fixed: FS#1947 - Unchecking all PHP options in Limits interface causes problem when client edits website
parent 84710d22
...@@ -97,7 +97,6 @@ class page_action extends tform_actions { ...@@ -97,7 +97,6 @@ class page_action extends tform_actions {
parent::onSubmit(); parent::onSubmit();
} }
function onShowEnd() { function onShowEnd() {
global $app; global $app;
......
...@@ -604,6 +604,9 @@ $form["tabs"]['limits'] = array ( ...@@ -604,6 +604,9 @@ $form["tabs"]['limits'] = array (
'web_php_options' => array ( 'web_php_options' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY', 'formtype' => 'CHECKBOXARRAY',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'web_php_options_notempty'),
),
'default' => '', 'default' => '',
'separator' => ',', 'separator' => ',',
'valuelimit' => 'client:web_php_options', 'valuelimit' => 'client:web_php_options',
...@@ -668,6 +671,9 @@ $form["tabs"]['limits'] = array ( ...@@ -668,6 +671,9 @@ $form["tabs"]['limits'] = array (
'ssh_chroot' => array ( 'ssh_chroot' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY', 'formtype' => 'CHECKBOXARRAY',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'ssh_chroot_notempty'),
),
'default' => '', 'default' => '',
'separator' => ',', 'separator' => ',',
'valuelimit' => 'client:ssh_chroot', 'valuelimit' => 'client:ssh_chroot',
......
...@@ -593,6 +593,9 @@ $form["tabs"]['limits'] = array ( ...@@ -593,6 +593,9 @@ $form["tabs"]['limits'] = array (
'web_php_options' => array ( 'web_php_options' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY', 'formtype' => 'CHECKBOXARRAY',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'web_php_options_notempty'),
),
'default' => '', 'default' => '',
'separator' => ',', 'separator' => ',',
'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP') 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
...@@ -656,6 +659,9 @@ $form["tabs"]['limits'] = array ( ...@@ -656,6 +659,9 @@ $form["tabs"]['limits'] = array (
'ssh_chroot' => array ( 'ssh_chroot' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY', 'formtype' => 'CHECKBOXARRAY',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'ssh_chroot_notempty'),
),
'default' => '', 'default' => '',
'separator' => ',', 'separator' => ',',
'value' => array('no' => 'None', 'jailkit' => 'Jailkit') 'value' => array('no' => 'None', 'jailkit' => 'Jailkit')
......
...@@ -107,4 +107,6 @@ $wb['company_id_txt'] = 'Company/Entrepreneur ID'; ...@@ -107,4 +107,6 @@ $wb['company_id_txt'] = 'Company/Entrepreneur ID';
$wb["limit_openvz_vm_txt"] = 'Max. number of virtual servers'; $wb["limit_openvz_vm_txt"] = 'Max. number of virtual servers';
$wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template'; $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template';
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.'; $wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
?> ?>
...@@ -106,4 +106,6 @@ $wb["required_fields_txt"] = '* Required fields'; ...@@ -106,4 +106,6 @@ $wb["required_fields_txt"] = '* Required fields';
$wb["limit_openvz_vm_txt"] = 'Max. number of virtual servers'; $wb["limit_openvz_vm_txt"] = 'Max. number of virtual servers';
$wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template'; $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template';
$wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.'; $wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.';
$wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.';
$wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.';
?> ?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment