From cdda6b98d785f103d9be6643a99a882c0d65b64c Mon Sep 17 00:00:00 2001 From: fantu <fantu@ispconfig3> Date: Sun, 21 Dec 2008 04:51:07 -0500 Subject: [PATCH] fix parse error --- interface/web/client/form/client.tform.php | 48 +++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 39 insertions(+), 9 deletions(-) diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 11def8e..1124c7e 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -50,6 +50,18 @@ $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 +//* Languages +$language_list = array(); +$handle = @opendir(ISPC_ROOT_PATH.'/lib/lang'); +while ($file = @readdir ($handle)) { + if ($file != '.' && $file != '..') { + if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') { + $tmp = substr($file, 0, 2); + $language_list[$tmp] = $tmp; + } + } +} + $form["tabs"]['address'] = array ( 'title' => "Address", 'width' => 100, @@ -92,6 +104,9 @@ 'class' => 'validate_client', 'function' => 'username_unique', 'errmsg'=> 'username_error_unique'), + 2 => array ( 'type' => 'REGEX', + 'regex' => '/^[\w\.\-\_]{0,50}$/', + 'errmsg'=> 'username_error_regex'), ), 'default' => '', 'value' => '', @@ -117,7 +132,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => $conf["language"], - 'value' => array('en' => 'en'), + 'value' => $language_list, 'separator' => '', 'width' => '30', 'maxlength' => '255', @@ -181,14 +196,15 @@ ), 'country' => array ( 'datatype' => 'VARCHAR', - 'formtype' => 'TEXT', - 'default' => '', - 'value' => '', - 'separator' => '', - 'width' => '30', - 'maxlength' => '255', - 'rows' => '', - 'cols' => '' + + 'formtype' => 'SELECT', + 'default' => 'DE', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name', + 'keyfield'=> 'iso', + 'valuefield'=> 'printable_name' + ), + 'value' => '' ), 'telephone' => array ( 'datatype' => 'VARCHAR', @@ -281,6 +297,20 @@ ################################## # Begin Datatable fields ################################## + 'template_master' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '1', + 'datasource' => array ( 'type' => 'CUSTOM', + 'class'=> 'custom_datasource', + 'function'=> 'master_templates' + ), + 'value' => '' + ), + 'template_additional' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + ), 'default_mailserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', -- Gitblit v1.9.1