From c8a20c78996a10b6a9d4ebf46b2eac73410e6a2d Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 19 Jul 2011 13:51:58 +0000 Subject: [PATCH] Added HIDEBLOB custom field type small changes to agent interface git-svn-id: svn://192.168.202.10@1697 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 2 ++ extras/MySQL_AST_CREATE_tables.sql | 4 ++-- extras/upgrade_2.4.sql | 5 ++++ .../TO_BE_TRANSLATED_2.4.txt | 1 + www/agc/functions.php | 7 +++--- www/agc/vdc_form_display.php | 7 +++--- www/agc/vicidial.php | 13 ++++++---- www/vicidial/admin_lists_custom.php | 24 ++++++++++++++++--- 8 files changed, 48 insertions(+), 15 deletions(-) diff --git a/UPGRADE b/UPGRADE index 117257b6..a7038014 100644 --- a/UPGRADE +++ b/UPGRADE @@ -646,6 +646,8 @@ OTHER CHANGES: 146. Added manual dial agent skip lead logging to the user stats page +147. Added HIDEBLOB field type for custom list fields + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 05b202e5..31d55dd0 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -2265,7 +2265,7 @@ field_name VARCHAR(5000), field_description VARCHAR(100), field_rank SMALLINT(5), field_help VARCHAR(1000), -field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT','HIDDEN','READONLY') default 'TEXT', +field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT','HIDDEN','READONLY','HIDEBLOB') default 'TEXT', field_options VARCHAR(5000), field_size SMALLINT(5), field_max SMALLINT(5), @@ -2549,7 +2549,7 @@ ALTER TABLE vicidial_closer_log_archive MODIFY closecallid INT(9) UNSIGNED NOT N CREATE TABLE vicidial_outbound_ivr_log_archive LIKE vicidial_outbound_ivr_log; -UPDATE system_settings SET db_schema_version='1287',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1288',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index 2a4c3f3f..3e381de3 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -890,3 +890,8 @@ index (campaign_id) ); UPDATE system_settings SET db_schema_version='1287',db_schema_update_date=NOW() where db_schema_version < 1287; + +ALTER TABLE vicidial_lists_fields MODIFY field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY','SCRIPT','HIDDEN','READONLY','HIDEBLOB') default 'TEXT'; + +UPDATE system_settings SET db_schema_version='1288',db_schema_update_date=NOW() where db_schema_version < 1288; + diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 7a604d4a..520dd8bf 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -668,6 +668,7 @@ Client Protocol|| This is the phone protocol that will be used for all phones created when submitted. SIP and IAX2 are VOIP protocols that will create conf file entries to allow those phoens to register on the servers|| Local GMT|| This is the time zone that all of the phones will be created with|| +HIDEBLOB is similar to HIDDEN except the data storage type on the database is a BLOB type, suitable for binary data or data that needs to be secured|| lead_report_export.php diff --git a/www/agc/functions.php b/www/agc/functions.php index 735cc845..5c88d09d 100644 --- a/www/agc/functions.php +++ b/www/agc/functions.php @@ -11,6 +11,7 @@ # 100629-1201 - First Build # 101124-0625 - Added lookup_gmt and dialable_gmt functions # 110630-0026 - Added HIDDEN and READONLY field types +# 110719-0858 - Added HIDEBLOB field type # @@ -153,7 +154,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user) {$CFoutput .= "right";} $CFoutput .= ">"; } - if ( ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') ) + if ( ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') and ($A_field_type[$o]!='HIDEBLOB') ) {$CFoutput .= "$A_field_name[$o]";} if ( ($A_name_position[$o]=='TOP') or ($A_field_type[$o]=='SCRIPT') ) {$CFoutput .= "   $helpHTML
";} @@ -246,7 +247,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user) if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';} $field_HTML .= " $A_field_value[$o]\n"; } - if ($A_field_type[$o]=='HIDDEN') + if ( ($A_field_type[$o]=='HIDDEN') or ($A_field_type[$o]=='HIDEBLOB') ) { if (strlen($A_field_value[$o]) < 1) {$A_field_value[$o] = $A_field_default[$o];} if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';} @@ -330,7 +331,7 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user) $field_HTML .= ""; } - if ( ($A_name_position[$o]=='LEFT') and ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') ) + if ( ($A_name_position[$o]=='LEFT') and ($A_field_type[$o]!='SCRIPT') and ($A_field_type[$o]!='HIDDEN') and ($A_field_type[$o]!='HIDEBLOB') ) { $CFoutput .= " $field_HTML $helpHTML"; } diff --git a/www/agc/vdc_form_display.php b/www/agc/vdc_form_display.php index 1fa3a965..0cf126ed 100644 --- a/www/agc/vdc_form_display.php +++ b/www/agc/vdc_form_display.php @@ -12,10 +12,11 @@ # 100703-1124 - Added submit_button,admin_submit fields, which will log to admin log # 100712-2322 - Added code to log vicidial_list.entry_list_id field if data altered # 100916-1749 - Added non-lead variable parsing +# 110719-0856 - Added HIDEBLOB type # -$version = '2.4-4'; -$build = '100916-1749'; +$version = '2.4-5'; +$build = '110719-0856'; require("dbconnect.php"); require_once("functions.php"); @@ -306,7 +307,7 @@ if ($stage=='SUBMIT') $A_field_value[$o] = $form_field_value; - if ( ($A_field_type[$o]=='DISPLAY') or ($A_field_type[$o]=='SCRIPT') or ($A_field_type[$o]=='HIDDEN') or ($A_field_type[$o]=='READONLY') ) + if ( ($A_field_type[$o]=='DISPLAY') or ($A_field_type[$o]=='SCRIPT') or ($A_field_type[$o]=='HIDDEN') or ($A_field_type[$o]=='HIDEBLOB') or ($A_field_type[$o]=='READONLY') ) { $A_field_value[$o]='----IGNORE----'; } diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 8ad3bcd3..694b7ee3 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -359,10 +359,11 @@ # 110707-1412 - Added last_inbound_call_time and finish compatibility # 110713-0048 - Allow for full hiding of the phone number field label # 110718-1159 - Added logging of skipped leads +# 110719-0854 - Removed debug output and small display alignment changes # -$version = '2.4-336c'; -$build = '110718-1159'; +$version = '2.4-337c'; +$build = '110719-0854'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=73; $one_mysql_log=0; @@ -2760,6 +2761,10 @@ $MASTERwidth=($BROWSER_WIDTH - 340); $MASTERheight=($BROWSER_HEIGHT - 200); if ($MASTERwidth < 430) {$MASTERwidth = '430';} if ($MASTERheight < 300) {$MASTERheight = '300';} +if ($per_call_notes == 'ENABLED') + { + if ($MASTERheight < 340) {$MASTERheight = '340';} + } if ($webphone_location == 'bar') {$MASTERwidth = ($MASTERwidth + $webphone_height);} $CAwidth = ($MASTERwidth + 340); # 770 - cover all (none-in-session, customer hunngup, etc...) @@ -5664,7 +5669,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { hideDiv('NeWManuaLDiaLBox'); - document.getElementById("debugbottomspan").innerHTML = "DEBUG OUTPUT" + document.vicidial_form.MDPhonENumbeR.value + "|" + active_group_alias; + // document.getElementById("debugbottomspan").innerHTML = "DEBUG OUTPUT" + document.vicidial_form.MDPhonENumbeR.value + "|" + active_group_alias; var sending_group_alias = 0; var MDDiaLCodEform = document.vicidial_form.MDDiaLCodE.value; @@ -10013,7 +10018,7 @@ else } CFN_tick++; } - document.getElementById("debugbottomspan").innerHTML = CFN_debug; +// document.getElementById("debugbottomspan").innerHTML = CFN_debug; } if (webformnumber == '1') diff --git a/www/vicidial/admin_lists_custom.php b/www/vicidial/admin_lists_custom.php index df163138..b11af1ac 100644 --- a/www/vicidial/admin_lists_custom.php +++ b/www/vicidial/admin_lists_custom.php @@ -17,10 +17,11 @@ # 100916-1754 - Do not show help in example form if help is empty # 101228-2049 - Fixed missing PHP long tag # 110629-1438 - Fixed change from DISPLAY or SCRIPT to other field type error, added HIDDEN and READONLY field types +# 110719-0910 - Added HIDEBLOB field type # -$admin_version = '2.4-11'; -$build = '110629-1438'; +$admin_version = '2.4-12'; +$build = '110719-0910'; require("dbconnect.php"); @@ -278,7 +279,7 @@ if ($action == "HELP")
- Field Type - This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent. SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does. HIDDEN will not show the agent the field, but will allow the field to have data imported into it and exported from it, as well as have it available to the script tab and web form address. READONLY will display the value of the data in the field, but will not allow the agent to alter the data. + Field Type - This option defines the type of field that will be displayed. TEXT is a standard single-line entry form, AREA is a multi-line text box, SELECT is a single-selection pull-down menu, MULTI is a multiple-select box, RADIO is a list of radio buttons where only one option can be selected, CHECKBOX is a list of checkboxes where multiple options can be selected, DATE is a year month day calendar popup where the agent can select the date and TIME is a time selection box. The default is TEXT. For the SELECT, MULTI, RADIO and CHECKBOX options you must define the option values below in the Field Options box. DISPLAY will display only and not allow for modification by the agent. SCRIPT will also display only, but you are able to use script variables just like in the Scripts feature. SCRIPT fields will also only display the content in the Options, and not the field name like the DISPLAY type does. HIDDEN will not show the agent the field, but will allow the field to have data imported into it and exported from it, as well as have it available to the script tab and web form address. READONLY will display the value of the data in the field, but will not allow the agent to alter the data. HIDEBLOB is similar to HIDDEN except the data storage type on the database is a BLOB type, suitable for binary data or data that needs to be secured.

@@ -1081,6 +1082,11 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) ) if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';} $field_HTML .= "-- HIDDEN --\n"; } + if ($A_field_type[$o]=='HIDEBLOB') + { + if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';} + $field_HTML .= "-- HIDDEN --\n"; + } if ($A_field_type[$o]=='SCRIPT') { if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';} @@ -1225,6 +1231,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) ) echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo " $NWB#vicidial_lists_fields-field_type$NWE \n"; @@ -1290,6 +1297,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) ) echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo " $NWB#vicidial_lists_fields-field_type$NWE \n"; @@ -1550,6 +1558,11 @@ function add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field $field_sql .= "VARCHAR($field_max) "; $field_cost = ($field_max + $field_cost); } + if ($field_type=='HIDEBLOB') + { + $field_sql .= "BLOB "; + $field_cost = 15; + } if ($field_type=='AREA') { $field_sql .= "TEXT "; @@ -1670,6 +1683,11 @@ function modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$fi $field_sql .= "VARCHAR($field_max) "; $field_cost = ($field_max + $field_cost); } + if ($field_type=='HIDEBLOB') + { + $field_sql .= "BLOB "; + $field_cost = 15; + } if ($field_type=='AREA') { $field_sql .= "TEXT ";