diff options
author | ivan <ivan> | 2011-10-16 01:17:49 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-10-16 01:17:49 +0000 |
commit | 83bc1fdf7145a2525b7e48f1dc6064e55ab4f31b (patch) | |
tree | 35a50374da74c950d34108da3e547ca7c49a35e6 | |
parent | 73aa1997599d7e079f94ae984509e7a116a2ce46 (diff) |
add do_not_call, RT#12981
-rw-r--r-- | FS/FS/Conf.pm | 7 | ||||
-rw-r--r-- | FS/FS/Schema.pm | 1 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 5 | ||||
-rw-r--r-- | httemplate/edit/cust_main/top_misc.html | 14 | ||||
-rw-r--r-- | httemplate/elements/phonenumber.html | 4 | ||||
-rw-r--r-- | httemplate/view/cust_main/contacts.html | 9 |
6 files changed, 37 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index e04ab1a31..d6da596c2 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -3341,6 +3341,13 @@ and customer address. Include units.', }, { + 'key' => 'cust_main-edit_calling_list_exempt', + 'section' => 'UI', + 'description' => 'Display the "calling_list_exempt" checkbox on customer edit.', + 'type' => 'checkbox', + }, + + { 'key' => 'support-key', 'section' => '', 'description' => 'A support key enables access to commercial services delivered over the network, such as the payroll module, access to the internal ticket system, priority support and optional backups.', diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index df4376705..535999535 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -887,6 +887,7 @@ sub tables_hashref { 'billday', 'int', 'NULL', '', '', '', 'edit_subject', 'char', 'NULL', 1, '', '', 'locale', 'varchar', 'NULL', 16, '', '', + 'calling_list_exempt', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 765987e93..041ecb1b4 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -337,6 +337,10 @@ Discourage individual CDR printing, empty or `Y' Allow self-service editing of ticket subjects, empty or 'Y' +=item calling_list_exempt + +Do not call, empty or 'Y' + =back =head1 METHODS @@ -1701,6 +1705,7 @@ sub check { || $self->ut_floatn('credit_limit') || $self->ut_numbern('billday') || $self->ut_enum('edit_subject', [ '', 'Y' ] ) + || $self->ut_enum('calling_list_exempt', [ '', 'Y' ] ) || $self->ut_enum('locale', [ '', FS::Locales->locales ]) ; diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index 1277d148e..2d1d978e3 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -120,6 +120,20 @@ $cust_main->edit_subject ? 'CHECKED' : '' %>></TD> <TD ALIGN="left"><% mt('Can edit ticket subjects') |h %></TD> </TR> +% } else { + <INPUT TYPE="hidden" NAME="edit_subject" VALUE="<% $cust_main->edit_subject %>"> +% } + +% # permission to edit +% if ( $conf->exists('cust_main-edit_calling_list_exempt') ) { + <TR> + <TD ALIGN="right"> + <INPUT TYPE="checkbox" NAME="calling_list_exempt" VALUE="Y" <% + $cust_main->calling_list_exempt ? 'CHECKED' : '' %>></TD> + <TD ALIGN="left"><% mt('Calling list exempt') |h %></TD> + </TR> +% } else { + <INPUT TYPE="hidden" NAME="calling_list_exempt" VALUE="<% $cust_main->calling_list_exempt %>"> % } </TABLE> diff --git a/httemplate/elements/phonenumber.html b/httemplate/elements/phonenumber.html index 854f5846d..736984b45 100644 --- a/httemplate/elements/phonenumber.html +++ b/httemplate/elements/phonenumber.html @@ -64,6 +64,10 @@ % % } % +% if ( $opt{'calling_list_exempt'} ) { + - calling list exempt +% } +% % } else { diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 14cd91843..fccdf0247 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -70,7 +70,8 @@ <TD COLSPAN=3 BGCOLOR="#ffffff"> <& /elements/phonenumber.html, $cust_main->get("${pre}daytime"), - 'callable'=>1 + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, &> </TD> </TR> @@ -79,7 +80,8 @@ <TD COLSPAN=3 BGCOLOR="#ffffff"> <& /elements/phonenumber.html, $cust_main->get("${pre}night"), - 'callable'=>1 + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, &> </TD> </TR> @@ -88,7 +90,8 @@ <TD COLSPAN=3 BGCOLOR="#ffffff"> <& /elements/phonenumber.html, $cust_main->get("${pre}mobile"), - 'callable'=>1 + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, &> </TD> </TR> |