add do_not_call, RT#12981
authorivan <ivan>
Sun, 16 Oct 2011 01:17:49 +0000 (01:17 +0000)
committerivan <ivan>
Sun, 16 Oct 2011 01:17:49 +0000 (01:17 +0000)
FS/FS/Conf.pm
FS/FS/Schema.pm
FS/FS/cust_main.pm
httemplate/edit/cust_main/top_misc.html
httemplate/elements/phonenumber.html
httemplate/view/cust_main/contacts.html

index e04ab1a..d6da596 100644 (file)
@@ -3340,6 +3340,13 @@ and customer address. Include units.',
     'type'        => 'checkbox',
   },
 
+  {
+    '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'     => '',
index df43767..5359995 100644 (file)
@@ -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' ] ],
index 765987e..041ecb1 100644 (file)
@@ -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 ])
   ;
 
index 1277d14..2d1d978 100644 (file)
         $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>
index 854f584..736984b 100644 (file)
 %
 %   } 
 %
+%   if ( $opt{'calling_list_exempt'} ) {
+ - calling list exempt
+%   }
+%
 % } else { 
 
   &nbsp;
index 14cd918..fccdf02 100644 (file)
@@ -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>