From fe9a23f542bc56c1c0b6dc30257418e38ff7bd3a Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Sat, 08 Jun 2013 18:57:40 -0400 Subject: [PATCH] - Fixed FS#2936 - Please check and limit username input length. --- interface/web/vm/form/openvz_vm.tform.php | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/interface/web/vm/form/openvz_vm.tform.php b/interface/web/vm/form/openvz_vm.tform.php index 3d75e84..efd9c84 100644 --- a/interface/web/vm/form/openvz_vm.tform.php +++ b/interface/web/vm/form/openvz_vm.tform.php @@ -29,6 +29,11 @@ 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 */ @@ -100,23 +105,33 @@ 'errmsg'=> 'ip_address_error_empty'), ), 'default' => '', + /* 'datasource' => array ( 'type' => 'SQL', 'querystring' => "SELECT ip_address FROM openvz_ip WHERE reserved = 'n' AND (vm_id = 0 or vm_id = '{RECORDID}') ORDER BY ip_address", 'keyfield'=> 'ip_address', 'valuefield'=> 'ip_address' ), + */ 'value' => '' ), 'hostname' => 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') + ), 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'hostname_error_empty'), ), 'default' => '', 'value' => '', 'width' => '30', - 'maxlength' => '255' + 'maxlength' => '255', + 'searchable' => 1 ), 'vm_password' => array ( 'datatype' => 'VARCHAR', @@ -158,7 +173,8 @@ 'width' => '', 'maxlength' => '', 'rows' => '10', - 'cols' => '30' + 'cols' => '30', + 'searchable' => 2 ), ################################## # ENDE Datatable fields -- Gitblit v1.9.1