Added DISPLAY readonly field typ to custom list fields

git-svn-id: svn://192.168.202.10@1429 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-05-10 15:48:02 +00:00
parent 559f2523dc
commit e72a328dc3
4 changed files with 28 additions and 6 deletions
+2 -2
View File
@@ -2077,7 +2077,7 @@ field_name VARCHAR(1000),
field_description VARCHAR(100),
field_rank SMALLINT(5),
field_help VARCHAR(1000),
field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME') default 'TEXT',
field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY') default 'TEXT',
field_options VARCHAR(5000),
field_size SMALLINT(5),
field_max SMALLINT(5),
@@ -2230,7 +2230,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1219',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1220',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+4
View File
@@ -313,3 +313,7 @@ UPDATE system_settings SET db_schema_version='1218',db_schema_update_date=NOW();
ALTER TABLE vicidial_lists_fields ADD field_order SMALLINT(5) default '1';
UPDATE system_settings SET db_schema_version='1219',db_schema_update_date=NOW();
ALTER TABLE vicidial_lists_fields MODIFY field_type ENUM('TEXT','AREA','SELECT','MULTI','RADIO','CHECKBOX','DATE','TIME','DISPLAY') default 'TEXT';
UPDATE system_settings SET db_schema_version='1220',db_schema_update_date=NOW();
@@ -182,6 +182,7 @@ SUCCESS: Custom Field Modified||
SUCCESS: Custom Field Deleted||
Copy List Custom Fields||
ERROR: You cannot copy fields to the same list||
DISPLAY will display only and not allow for modification by the agent||
AST_VICIDIAL_ingrouplist.php
+21 -4
View File
@@ -10,10 +10,11 @@
# 100507-1027 - Added name position and options position, added extra space for name and help
# 100508-1855 - Added field_order to allow for multiple fields on the same line
# 100509-0922 - Added copy fields options
# 100510-1130 - Added DISPLAY field type option
#
$admin_version = '2.4-4';
$build = '100509-0922';
$admin_version = '2.4-5';
$build = '100510-1130';
require("dbconnect.php");
@@ -77,6 +78,10 @@ if (strlen($DB) < 1)
{$DB=0;}
if ($field_size > 100)
{$field_size = 100;}
if ( (strlen($field_size) < 1) or ($field_size < 1) )
{$field_size = 1;}
if ( (strlen($field_max) < 1) or ($field_max < 1) )
{$field_max = 1;}
if ($non_latin < 1)
@@ -249,7 +254,7 @@ if ($action == "HELP")
<A NAME="vicidial_lists_fields-field_type">
<BR>
<B>Field Type -</B> 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.
<B>Field Type -</B> 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.
<BR><BR>
<A NAME="vicidial_lists_fields-field_options">
@@ -909,7 +914,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
{echo "right";}
echo "><font size=2>";
}
echo "<a href=\"#ANCHOR_$A_field_label[$o]\">$A_field_name[$o]</a>";
echo "<a href=\"#ANCHOR_$A_field_label[$o]\"><B>$A_field_name[$o]</B></a>";
if ($A_name_position[$o]=='TOP')
{echo " &nbsp; <span style=\"position:static;\" id=P_HELP_$A_field_label[$o]></span><span style=\"position:static;background:white;\" id=HELP_$A_field_label[$o]> &nbsp; <a href=\"javascript:open_help('HELP_$A_field_label[$o]','$A_field_help[$o]');\">help+</a></span><BR>";}
else
@@ -971,6 +976,11 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
{
$field_HTML .= "<textarea name=$A_field_label[$o] id=$A_field_label[$o] ROWS=$A_field_max[$o] COLS=$A_field_size[$o]></textarea>";
}
if ($A_field_type[$o]=='DISPLAY')
{
if ($A_field_default[$o]=='NULL') {$A_field_default[$o]='';}
$field_HTML .= "$A_field_default[$o]\n";
}
if ($A_field_type[$o]=='DATE')
{
if ( (strlen($A_field_default[$o])<1) or ($A_field_default[$o]=='NULL') ) {$A_field_default[$o]=0;}
@@ -1098,6 +1108,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
echo "<option>CHECKBOX</option>\n";
echo "<option>DATE</option>\n";
echo "<option>TIME</option>\n";
echo "<option>DISPLAY</option>\n";
echo "<option selected>$A_field_type[$o]</option>\n";
echo "</select> $NWB#vicidial_lists_fields-field_type$NWE </td></tr>\n";
echo "<tr $bgcolor><td align=right>Field Options $A_field_rank[$o]: </td><td align=left><textarea name=field_options ROWS=5 COLS=60>$A_field_options[$o]</textarea> $NWB#vicidial_lists_fields-field_options$NWE </td></tr>\n";
@@ -1159,6 +1170,7 @@ if ( ($action == "MODIFY_CUSTOM_FIELDS") and ($list_id > 99) )
echo "<option>CHECKBOX</option>\n";
echo "<option>DATE</option>\n";
echo "<option>TIME</option>\n";
echo "<option>DISPLAY</option>\n";
echo "<option selected>TEXT</option>\n";
echo "</select> $NWB#vicidial_lists_fields-field_type$NWE </td></tr>\n";
echo "<tr $bgcolor><td align=right>Field Options: </td><td align=left><textarea name=field_options ROWS=5 COLS=60></textarea> $NWB#vicidial_lists_fields-field_options$NWE </td></tr>\n";
@@ -1405,6 +1417,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=='DISPLAY')
{
$field_sql .= "VARCHAR($field_max) ";
$field_cost = ($field_max + $field_cost);
}
if ($field_type=='AREA')
{
$field_sql .= "TEXT ";