summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/Schema.pm4
-rwxr-xr-xhttemplate/edit/agent.cgi19
3 files changed, 28 insertions, 2 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 8fce99024..a3f1b5422 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -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.',
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index b8ba5b2d4..f63bae929 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -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)
],
diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi
index 30a0865d3..6707d66a4 100755
--- a/httemplate/edit/agent.cgi
+++ b/httemplate/edit/agent.cgi
@@ -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>