From 833369e7a35190e31d25e2722a608d545590ae72 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 20 Mar 2012 06:55:00 -0400 Subject: [PATCH] Added strtoupper for country setting. --- interface/web/client/form/reseller.tform.php | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 45 insertions(+), 3 deletions(-) diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index 86ccd4a..77e2f54 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -50,6 +50,17 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete +//* Load themes +$themes_list = array(); +$handle = @opendir(ISPC_THEMES_PATH); +while ($file = @readdir ($handle)) { + if (substr($file, 0, 1) != '.') { + if(@is_dir(ISPC_THEMES_PATH."/$file")) { + $themes_list[$file] = $file; + } + } +} + //* Languages $language_list = array(); $handle = @opendir(ISPC_ROOT_PATH.'/lib/lang'); @@ -153,8 +164,8 @@ 'usertheme' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', - 'default' => 'default', - 'value' => array('default' => 'default'), + 'default' => $conf["theme"], + 'value' => $themes_list, 'separator' => '', 'width' => '30', 'maxlength' => '255', @@ -209,7 +220,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', - 'default' => $conf["country"], + 'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''), 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name', 'keyfield'=> 'iso', @@ -582,6 +593,9 @@ 'web_php_options' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOXARRAY', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'web_php_options_notempty'), + ), 'default' => '', 'separator' => ',', 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP') @@ -645,6 +659,9 @@ 'ssh_chroot' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOXARRAY', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'ssh_chroot_notempty'), + ), 'default' => '', 'separator' => ',', 'value' => array('no' => 'None', 'jailkit' => 'Jailkit') @@ -806,6 +823,31 @@ 'rows' => '', 'cols' => '' ), + 'limit_openvz_vm' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_openvz_vm_error_notint'), + ), + 'default' => '0', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), + 'limit_openvz_vm_template_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name', + 'keyfield'=> 'template_id', + 'valuefield'=> 'template_name' + ), + 'value' => array(0 => ' ') + ), ################################## # END Datatable fields ################################## -- Gitblit v1.9.1