From 37b29231e47a0c4458dc1c15d98588f16f07e1e2 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Thu, 06 Aug 2015 03:18:44 -0400 Subject: [PATCH] - don't set password via remoting if field is empty --- interface/web/client/form/reseller.tform.php | 147 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 136 insertions(+), 11 deletions(-) diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index b70c765..daba140 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -116,7 +116,10 @@ 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'contact_name' => array ( 'datatype' => 'VARCHAR', @@ -131,7 +134,10 @@ 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'customer_no' => array ( 'datatype' => 'VARCHAR', @@ -316,12 +322,17 @@ 'email' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', - 'filters' => array( 0 => array( 'event' => 'SAVE', - 'type' => 'IDNTOASCII'), - 1 => array( 'event' => 'SHOW', - 'type' => 'IDNTOUTF8'), - 2 => array( 'event' => 'SAVE', - 'type' => 'TOLOWER') + 'filters' => array( + 0 => array( 'event' => 'SAVE','type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW','type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE','type' => 'TOLOWER') + ), + 'validators' => array ( + 0 => array ( 'type' => 'REGEX', + 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i', + 'errmsg'=> 'email_error_isemail'), + 1 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'email_error_empty'), ), 'default' => '', 'value' => '', @@ -369,7 +380,12 @@ 'class' => 'validate_client', 'function' => 'check_vat_id', 'errmsg'=> 'invalid_vat_id'), - ), + ), + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + 1 => array( 'event' => 'SAVE', + 'type' => 'TOUPPER') + ), ), 'company_id' => array ( 'datatype' => 'VARCHAR', @@ -435,7 +451,12 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + 1 => array( 'event' => 'SAVE', + 'type' => 'TOUPPER') + ), ), 'bank_account_swift' => array ( 'datatype' => 'VARCHAR', @@ -446,7 +467,12 @@ 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + 1 => array( 'event' => 'SAVE', + 'type' => 'TOUPPER') + ), ), 'notes' => array ( 'datatype' => 'TEXT', @@ -769,6 +795,105 @@ 'rows' => '', 'cols' => '' ), + 'default_xmppserver' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '1', + 'datasource' => array ( 'type' => 'CUSTOM', + 'class'=> 'custom_datasource', + 'function'=> 'client_servers' + ), + 'value' => '', + 'name' => 'default_xmppserver' + ), + 'xmpp_servers' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'MULTIPLE', + 'separator' => ',', + 'default' => '1', + 'datasource' => array ( 'type' => 'CUSTOM', + 'class'=> 'custom_datasource', + 'function'=> 'client_servers' + ), + 'validators' => array ( + 0 => array ( 'type' => 'CUSTOM', + 'class' => 'validate_client', + 'function' => 'check_used_servers', + 'errmsg'=> 'xmpp_servers_used'), + ), + 'value' => '', + 'name' => 'xmpp_servers' + ), + 'limit_xmpp_domain' => array( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_xmpp_domain_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), + 'limit_xmpp_user' => array( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'ISINT', + 'errmsg'=> 'limit_xmpp_user_error_notint'), + ), + 'default' => '-1', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '10', + 'rows' => '', + 'cols' => '' + ), + 'limit_xmpp_muc' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_anon' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_vjud' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_proxy' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_status' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_pastebin' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), + 'limit_xmpp_httparchive' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), 'default_webserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', -- Gitblit v1.9.1