From 8c4aa39481bbfde2b403f4787c85c057e84f2e12 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 22 Jul 2009 09:01:13 -0400
Subject: [PATCH] Merged revisions 1216 - 1279 from trunk
---
interface/web/sites/form/ftp_user.tform.php | 208 +++++++++++++++++++++++++++++----------------------
1 files changed, 119 insertions(+), 89 deletions(-)
diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php
index 4950a1b..add5c72 100644
--- a/interface/web/sites/form/ftp_user.tform.php
+++ b/interface/web/sites/form/ftp_user.tform.php
@@ -83,12 +83,10 @@
'username' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'username_error_empty'),
- 1 => array ( 'type' => 'UNIQUE',
+ 'validators' => array ( 0 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'username_error_unique'),
- 2 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-]{1,64}$/',
+ 1 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[\w\.\-]{0,64}$/',
'errmsg'=> 'username_error_regex'),
),
'default' => '',
@@ -131,93 +129,125 @@
if($_SESSION["s"]["user"]["typ"] == 'admin') {
$form["tabs"]['advanced'] = array (
- 'title' => "Options",
- 'width' => 100,
- 'template' => "templates/ftp_user_advanced.htm",
- 'fields' => array (
- ##################################
- # Begin Datatable fields
- ##################################
- 'uid' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'uid_error_empty'),
- ),
- 'default' => '0',
- 'value' => '',
- 'width' => '30',
- 'maxlength' => '255'
- ),
- 'gid' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'uid_error_empty'),
- ),
- 'default' => '0',
- 'value' => '',
- 'width' => '30',
- 'maxlength' => '255'
- ),
- 'dir' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'directory_error_empty'),
- ),
- 'default' => '',
- 'value' => '',
- 'width' => '30',
- 'maxlength' => '255'
- ),
- 'quota_files' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '7',
- 'maxlength' => '7'
- ),
- 'ul_ratio' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '7',
- 'maxlength' => '7'
- ),
- 'dl_ratio' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '7',
- 'maxlength' => '7'
- ),
- 'ul_bandwidth' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '7',
- 'maxlength' => '7'
- ),
- 'dl_bandwidth' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'default' => '0',
- 'value' => '',
- 'width' => '7',
- 'maxlength' => '7'
- ),
- ##################################
- # ENDE Datatable fields
- ##################################
- )
+ 'title' => "Options",
+ 'width' => 100,
+ 'template' => "templates/ftp_user_advanced.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'uid' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'uid_error_empty'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ 'gid' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'uid_error_empty'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ 'dir' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'directory_error_empty'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ 'quota_files' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '7',
+ 'maxlength' => '7'
+ ),
+ 'ul_ratio' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '7',
+ 'maxlength' => '7'
+ ),
+ 'dl_ratio' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '7',
+ 'maxlength' => '7'
+ ),
+ 'ul_bandwidth' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '7',
+ 'maxlength' => '7'
+ ),
+ 'dl_bandwidth' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '7',
+ 'maxlength' => '7'
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
+);
+
+} else {
+
+$form["tabs"]['advanced'] = array (
+ 'title' => "Options",
+ 'width' => 100,
+ 'template' => "templates/ftp_user_advanced_client.htm",
+ 'fields' => array (
+ ##################################
+ # Begin Datatable fields
+ ##################################
+ 'dir' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'directory_error_empty'),
+ 1 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_ftpuser',
+ 'function' => 'ftp_dir',
+ 'errmsg' => 'directory_error_notinweb'),
+ ),
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
+ ##################################
+ # ENDE Datatable fields
+ ##################################
+ )
);
}
+
?>
\ No newline at end of file
--
Gitblit v1.9.1