agent username/password, RT#9608
authorivan <ivan>
Fri, 12 Nov 2010 01:17:18 +0000 (01:17 +0000)
committerivan <ivan>
Fri, 12 Nov 2010 01:17:18 +0000 (01:17 +0000)
FS/FS/Conf.pm
FS/FS/Schema.pm
httemplate/edit/agent.cgi

index 8fce990..a3f1b54 100644 (file)
@@ -2287,6 +2287,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'selfservice-agent_login',
+    'section'     => 'self-service',
+    'description' => 'Allow agent login via self-service.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'card_refund-days',
     'section'     => 'billing',
     'description' => 'After a payment, the number of days a refund link will be available for that payment.  Defaults to 120.',
index b8ba5b2..f63bae9 100644 (file)
@@ -352,8 +352,8 @@ sub tables_hashref {
         'invoice_template', 'varchar', 'NULL', $char_d, '', '',
         'agent_custnum',        'int', 'NULL',      '', '', '',
         'disabled',            'char', 'NULL',       1, '', '', 
-        'username',         'varchar', 'NULL', $char_d, '', '', #deprecated
-        '_password',        'varchar', 'NULL', $char_d, '', '', #deprecated
+        'username',         'varchar', 'NULL', $char_d, '', '',
+        '_password',        'varchar', 'NULL', $char_d, '', '',
         'freq',              'int', 'NULL', '', '', '', #deprecated (never used)
         'prog',                     @perl_type, '', '', #deprecated (never used)
       ],
index 30a0865..6707d66 100755 (executable)
@@ -54,6 +54,25 @@ Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %>
     </TD>
   </TR>
 
+% if ( $conf->exists('selfservice-agent_login') ) {
+
+    <TR>
+      <TH ALIGN="right">Username</TH>
+      <TD><INPUT TYPE="text" NAME="username" SIZE=16 VALUE="<% $agent->username %>"></TD>
+    </TR>
+
+    <TR>
+      <TH ALIGN="right">Password</TH>
+      <TD><INPUT TYPE="password" NAME="_password" SIZE=16 VALUE="<% $agent->_password %>"></TD>
+    </TR>
+
+% } else {
+
+    <INPUT TYPE="hidden" NAME="username" VALUE="<% $agent->username |h %>">
+    <INPUT TYPE="hidden" NAME="_password" VALUE="<% $agent->_password |h %>">
+
+% }
+
   <TR>
     <TD ALIGN="right">Disable</TD>
     <TD><INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"<% $agent->disabled eq 'Y' ? ' CHECKED' : '' %>></TD>