From 14150027a166de379bd61ba3f15ac8c8a92524d5 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 18 Sep 2015 01:54:15 -0400
Subject: [PATCH] update mail_mail_domain_plugin.inc.php

---
 interface/web/client/form/client.tform.php |   47 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index c0bed86..eab4e02 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.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',
@@ -322,9 +328,12 @@
 				2 => array( 'event' => 'SAVE',
 					'type' => 'TOLOWER')
 			),
-			'validators' => array (  0 => array ( 'type' => 'REGEX',
+			'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'  => '',
@@ -372,7 +381,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',
@@ -438,7 +452,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',
@@ -449,7 +468,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',
@@ -773,6 +797,17 @@
 			'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',

--
Gitblit v1.9.1