From c27941663bf568a0b49662a38e43a4e972bad47f Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Tue, 07 Aug 2012 02:29:14 -0400
Subject: [PATCH] added support for extended generatePassword function
---
interface/web/client/form/client.tform.php | 97 +++++++++++++++++++++++++++++-------------------
1 files changed, 59 insertions(+), 38 deletions(-)
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 85b8671..8a76281 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -29,20 +29,25 @@
Hint:
The ID field of the database table is not part of the datafield definition.
The ID field must be always auto incement (int or bigint).
+
+ Search:
+ - searchable = 1 or searchable = 2 include the field in the search
+ - searchable = 1: this field will be the title of the search result
+ - searchable = 2: this field will be included in the description of the search result
*/
-$form["title"] = "Client";
-$form["description"] = "";
-$form["name"] = "client";
-$form["action"] = "client_edit.php";
-$form["db_table"] = "client";
+$form["title"] = "Client";
+$form["description"] = "";
+$form["name"] = "client";
+$form["action"] = "client_edit.php";
+$form["db_table"] = "client";
$form["db_table_idx"] = "client_id";
-$form["db_history"] = "yes";
+$form["db_history"] = "yes";
$form["tab_default"] = "address";
$form["list_default"] = "client_list.php";
-$form["auth"] = 'yes';
+$form["auth"] = 'yes';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
@@ -90,21 +95,23 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'contact_name' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'contact_error_empty'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
+ 'errmsg'=> 'contact_error_empty'),
+ ),
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 1
),
'customer_no' => array (
'datatype' => 'VARCHAR',
@@ -115,28 +122,34 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'username' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'username_error_empty'),
- 1 => array ( 'type' => 'CUSTOM',
- 'class' => 'validate_client',
- 'function' => 'username_unique',
- 'errmsg'=> 'username_error_unique'),
- 2 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-\_]{0,64}$/',
- 'errmsg'=> 'username_error_regex'),
- ),
+ 'errmsg'=> 'username_error_empty'),
+ 1 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_client',
+ 'function' => 'username_unique',
+ 'errmsg'=> 'username_error_unique'),
+ 2 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_client',
+ 'function' => 'username_collision',
+ 'errmsg'=> 'username_error_collision'),
+ 3 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[\w\.\-\_]{0,64}$/',
+ 'errmsg'=> 'username_error_regex'),
+ ),
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'password' => array (
'datatype' => 'VARCHAR',
@@ -181,7 +194,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'zip' => array (
'datatype' => 'VARCHAR',
@@ -192,7 +206,8 @@
'width' => '10',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'city' => array (
'datatype' => 'VARCHAR',
@@ -203,7 +218,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'state' => array (
'datatype' => 'VARCHAR',
@@ -214,18 +230,18 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'country' => array (
'datatype' => 'VARCHAR',
-
'formtype' => 'SELECT',
'default' => (isset($conf['language']) ? strtoupper($conf['language']) : ''),
- 'datasource' => array ( 'type' => 'SQL',
- 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
- 'keyfield'=> 'iso',
- 'valuefield'=> 'printable_name'
- ),
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT iso,printable_name FROM country ORDER BY iso ASC',
+ 'keyfield' => 'iso',
+ 'valuefield' => 'printable_name'
+ ),
'value' => ''
),
'telephone' => array (
@@ -237,7 +253,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'mobile' => array (
'datatype' => 'VARCHAR',
@@ -248,7 +265,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'fax' => array (
'datatype' => 'VARCHAR',
@@ -259,7 +277,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'email' => array (
'datatype' => 'VARCHAR',
@@ -270,7 +289,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'internet' => array (
'datatype' => 'VARCHAR',
@@ -281,7 +301,8 @@
'width' => '30',
'maxlength' => '255',
'rows' => '',
- 'cols' => ''
+ 'cols' => '',
+ 'searchable' => 2
),
'icq' => array (
'datatype' => 'VARCHAR',
--
Gitblit v1.9.1