summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/access_user.html16
-rw-r--r--httemplate/edit/cust_main/bottomfixup.js1
-rw-r--r--httemplate/edit/cust_main/top_misc.html2
-rwxr-xr-xhttemplate/edit/cust_main_note.cgi12
-rw-r--r--httemplate/edit/mailinglistmember.html25
-rwxr-xr-xhttemplate/edit/part_svc.cgi3
-rw-r--r--httemplate/edit/prepay_credit.cgi5
-rw-r--r--httemplate/edit/process/mailinglistmember.html6
-rw-r--r--httemplate/edit/process/part_device.html4
-rw-r--r--httemplate/edit/process/prepay_credit.cgi1
-rwxr-xr-xhttemplate/edit/process/rate_region.cgi2
-rw-r--r--httemplate/edit/process/svc_mailinglist.html11
-rw-r--r--httemplate/edit/rate_detail.html11
-rw-r--r--httemplate/edit/rate_region.cgi28
-rwxr-xr-xhttemplate/edit/svc_acct.cgi2
-rwxr-xr-xhttemplate/edit/svc_domain.cgi2
-rw-r--r--httemplate/edit/svc_mailinglist.cgi25
17 files changed, 127 insertions, 29 deletions
diff --git a/httemplate/edit/access_user.html b/httemplate/edit/access_user.html
index 73488ef9a..1f52b4789 100644
--- a/httemplate/edit/access_user.html
+++ b/httemplate/edit/access_user.html
@@ -7,16 +7,18 @@
{ field=>'_password2', type=>'password' },
'last',
'first',
+ { field=>'user_custnum', type=>'search-cust_main', },
{ field=>'disabled', type=>'checkbox', value=>'Y' },
],
'labels' => {
- 'usernum' => 'User number',
- 'username' => 'Username',
- '_password' => 'Password',
- '_password2'=> 'Re-enter Password',
- 'last' => 'Last name',
- 'first' => 'First name',
- 'disabled' => 'Disable employee',
+ 'usernum' => 'User number',
+ 'username' => 'Username',
+ '_password' => 'Password',
+ '_password2 '=> 'Re-enter Password',
+ 'last' => 'Last name',
+ 'first' => 'First name',
+ 'user_custnum' => 'Customer (optional)',
+ 'disabled' => 'Disable employee',
},
'edit_callback' => sub { my( $c, $o ) = @_;
$o->set('_password', '');
diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js
index 5d06f3c04..1a06d9497 100644
--- a/httemplate/edit/cust_main/bottomfixup.js
+++ b/httemplate/edit/cust_main/bottomfixup.js
@@ -225,7 +225,6 @@ function post_standardization() {
} else {
- cf.elements['geocode'].value = '';
post_geocode();
}
diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html
index 3d6c4862d..d1d436851 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -78,7 +78,7 @@
'name' => 'signupdate',
'value' => $cust_main->signupdate,
'label' => 'Signup date',
- 'format' => $conf->config('date_format') || "%m/%d/%Y",
+ 'format' => ( $conf->config('date_format') || "%m/%d/%Y" ),
})
%>
% }
diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi
index 6c6a1a9a0..e2501cb54 100755
--- a/httemplate/edit/cust_main_note.cgi
+++ b/httemplate/edit/cust_main_note.cgi
@@ -6,11 +6,11 @@
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<INPUT TYPE="hidden" NAME="notenum" VALUE="<% $notenum %>">
-
-<BR><BR>
-<TEXTAREA NAME="comment" ROWS="12" COLS="60">
-<% $comment %>
-</TEXTAREA>
+<% include('/elements/htmlarea.html', 'field' => 'comment',
+ 'curr_value' => $comment) %>
+% #<TEXTAREA NAME="comment" ROWS="12" COLS="60">
+% # <% $comment %>
+% #</TEXTAREA>
<BR><BR>
<INPUT TYPE="submit" VALUE="<% $notenum ? "Apply Changes" : "Add Note" %>">
@@ -33,6 +33,8 @@ if ( $cgi->param('error') ) {
$comment = $note->comments;
}
+$comment =~ s/\r//g; # remove weird line breaks to protect FCKeditor
+
$cgi->param('custnum') =~ /^(\d+)$/ or die "illeagl custnum";
my $custnum = $1;
diff --git a/httemplate/edit/mailinglistmember.html b/httemplate/edit/mailinglistmember.html
new file mode 100644
index 000000000..2391cb697
--- /dev/null
+++ b/httemplate/edit/mailinglistmember.html
@@ -0,0 +1,25 @@
+<% include( 'elements/edit.html',
+ 'name_singular' => 'member',
+ 'table' => 'mailinglistmember',
+ 'popup' => 1,
+ 'fields' => [
+ { field=>'listnum', type=>'hidden', },
+ { field=>'svcnum', type=>'hidden', }, #not yet
+ { field=>'contactemailnum', type=>'hidden', }, #not yet
+ { field=>'email', type=>'text', },
+ ],
+ 'labels' => { 'membernum' => 'Member',
+ 'email' => 'Email address',
+ },
+ 'new_callback' => $new_callback,
+ )
+%>
+<%init>
+
+my $new_callback = sub {
+ #my( $cgi, $object, $fields_listref, $opt_hashref ) = @_;
+ my( $cgi, $object ) = @_;
+ $object->listnum( $cgi->param('listnum') );
+};
+
+</%init>
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index 51925c0c5..98ed9fec1 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -15,7 +15,8 @@ Disable new orders <INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"<% $hashref->
Service definitions are the templates for items you offer to your customers.
<UL><LI>svc_acct - Accounts - anything with a username (Mailboxes, PPP accounts, shell accounts, RADIUS entries for broadband, etc.)
<LI>svc_domain - Domains
- <LI>svc_forward - mail forwarding
+ <LI>svc_forward - Mail forwarding
+ <LI>svc_mailinglist - Mailing list
<LI>svc_www - Virtual domain website
<LI>svc_broadband - Broadband/High-speed Internet service (always-on)
<LI>svc_phone - Customer phone numbers
diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi
index f7a1b0801..ed404b7cd 100644
--- a/httemplate/edit/prepay_credit.cgi
+++ b/httemplate/edit/prepay_credit.cgi
@@ -7,16 +7,13 @@
Generate
<INPUT TYPE="text" NAME="num" VALUE="<% $cgi->param('num') || '(quantity)' |h %>" SIZE=10 MAXLENGTH=10 onFocus="if ( this.value == '(quantity)' ) { this.value = ''; }">
-prepaid cards of
-
-<INPUT TYPE="text" NAME="length" SIZE=3 MAXLENGTH=2 VALUE=8>&nbsp;
<SELECT NAME="type">
% foreach (qw(alpha alphanumeric numeric)) {
<OPTION<% $cgi->param('type') eq $_ ? ' SELECTED' : '' %>><% $_ %>
% }
</SELECT>
-characters each
+prepaid cards
<BR>for <SELECT NAME="agentnum"><OPTION>(any agent)
% foreach my $opt_agent ( qsearch('agent', { 'disabled' => '' } ) ) {
diff --git a/httemplate/edit/process/mailinglistmember.html b/httemplate/edit/process/mailinglistmember.html
new file mode 100644
index 000000000..f1842b8ef
--- /dev/null
+++ b/httemplate/edit/process/mailinglistmember.html
@@ -0,0 +1,6 @@
+<% include( 'elements/process.html',
+ 'table' => 'mailinglistmember',
+ 'popup_reload' => 'Member added',
+ )
+%>
+%#XXX ACL
diff --git a/httemplate/edit/process/part_device.html b/httemplate/edit/process/part_device.html
index 399991fc8..2b7e1da49 100644
--- a/httemplate/edit/process/part_device.html
+++ b/httemplate/edit/process/part_device.html
@@ -1,10 +1,6 @@
<% include( 'elements/process.html',
'table' => 'part_device',
'viewall_dir' => 'browse',
- 'process_m2m' => {
- 'link_table' => 'export_device',
- 'target_table' => 'part_export',
- },
)
%>
<%init>
diff --git a/httemplate/edit/process/prepay_credit.cgi b/httemplate/edit/process/prepay_credit.cgi
index a55522b86..8f2eb2b25 100644
--- a/httemplate/edit/process/prepay_credit.cgi
+++ b/httemplate/edit/process/prepay_credit.cgi
@@ -56,7 +56,6 @@ $hashref->{totalbytes} = $cgi->param('totalbytes') * $cgi->param('totalmultiplie
$error ||= FS::prepay_credit::generate( $num,
scalar($cgi->param('type')),
- $cgi->param('length'),
$hashref
);
diff --git a/httemplate/edit/process/rate_region.cgi b/httemplate/edit/process/rate_region.cgi
index 882991e9d..8036f7388 100755
--- a/httemplate/edit/process/rate_region.cgi
+++ b/httemplate/edit/process/rate_region.cgi
@@ -39,7 +39,7 @@ my @dest_detail = map {
new FS::rate_detail {
'ratenum' => $ratenum,
map { $_ => $cgi->param("$_$ratenum") }
- qw( min_included min_charge sec_granularity classnum )
+ qw( min_included conn_charge conn_sec min_charge sec_granularity classnum )
};
} qsearch('rate', {} );
diff --git a/httemplate/edit/process/svc_mailinglist.html b/httemplate/edit/process/svc_mailinglist.html
new file mode 100644
index 000000000..580f6ccbd
--- /dev/null
+++ b/httemplate/edit/process/svc_mailinglist.html
@@ -0,0 +1,11 @@
+<% include( 'elements/svc_Common.html',
+ 'table' => 'svc_mailinglist',
+ 'fields' => [ fields('svc_mailinglist'), 'listname' ],
+ )
+%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
+
+</%init>
diff --git a/httemplate/edit/rate_detail.html b/httemplate/edit/rate_detail.html
index dd8c3f6b3..869ace8d4 100644
--- a/httemplate/edit/rate_detail.html
+++ b/httemplate/edit/rate_detail.html
@@ -6,6 +6,8 @@
'dest_regionname' => 'Region',
'dest_prefixes_short' => 'Prefix(es)',
'min_included' => 'Included minutes/calls',
+ 'conn_charge' => 'Connection charge',
+ 'conn_sec' => 'For',
'min_charge' => 'Charge per minute/call',
'sec_granularity' => 'Granularity',
'classnum' => 'Usage class',
@@ -17,6 +19,13 @@
{ field=>'dest_regionname', type=>'fixed', },
{ field=>'dest_prefixes_short', type=>'fixed', },
{ field=>'min_included', type=>'text', size=>5 },
+ { field=>'conn_charge', type=>'money', size=>4 },
+ { field =>'conn_sec',
+ type =>'select',
+ options => [ keys %conn_secs ],
+ labels => \%conn_secs,
+ disable_empty => 1,
+ },
{ field=>'min_charge', type=>'money', size=>4 },
{ field =>'sec_granularity',
type =>'select',
@@ -38,9 +47,9 @@
<%once>
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
+tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs();
</%once>
-
<%init>
my $conf = new FS::Conf;
diff --git a/httemplate/edit/rate_region.cgi b/httemplate/edit/rate_region.cgi
index 9ca3a3569..f77c0dbe7 100644
--- a/httemplate/edit/rate_region.cgi
+++ b/httemplate/edit/rate_region.cgi
@@ -52,6 +52,12 @@
<FONT SIZE=-1>Included<BR>minutes/calls</FONT>
</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">
+ <FONT SIZE=-1>Connection<BR>charge</FONT>
+ </TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">
+ <FONT SIZE=-1>Connection<BR>charge for</FONT>
+ </TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">
<FONT SIZE=-1>Charge per<BR>minute/call</FONT>
</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">
@@ -88,7 +94,20 @@
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- $<INPUT TYPE="text" SIZE=6 NAME="min_charge<%$n%>" VALUE="<% $cgi->param("min_charge$n") || $rate_detail->min_charge |h %>">
+ <%$money_char%><INPUT TYPE="text" SIZE=9 NAME="conn_charge<%$n%>" VALUE="<% $cgi->param("conn_charge$n") || $rate_detail->conn_charge |h %>">
+ </TD>
+
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <SELECT NAME="conn_sec<%$n%>">
+% foreach my $conn_sec ( keys %conn_secs ) {
+% my $curr_value = $cgi->param("conn_sec$n") || $rate_detail->conn_sec;
+% my $selected = ($conn_sec==$curr_value) ? ' SELECTED' : '';
+ <OPTION VALUE="<% $conn_sec %>" <%$selected%>><% $conn_secs{$conn_sec} %></OPTION>
+% }
+ </TD>
+
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <%$money_char%><INPUT TYPE="text" SIZE=6 NAME="min_charge<%$n%>" VALUE="<% $cgi->param("min_charge$n") || $rate_detail->min_charge |h %>">
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
@@ -125,12 +144,19 @@
</FORM>
<% include('/elements/footer.html') %>
+<%once>
+
+tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs();
+</%once>
<%init>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $conf = new FS::Conf;
+my $money_char = $conf->config('money_char') || '$';
+
my $rate_region;
if ( $cgi->param('error') ) {
$rate_region = new FS::rate_region ( {
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index 9c21c44bc..99e4b74a4 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -132,7 +132,7 @@ Service # <% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
</TR>
% } else {
- <INPUT TYPE="hidden" NAME="cgp_aliases" VALUE="<% $svc_acct->cgp_aliases %>">
+ <INPUT TYPE="text" NAME="cgp_aliases" VALUE="<% $svc_acct->cgp_aliases %>">
% }
diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi
index c85dd3b72..78faf12b2 100755
--- a/httemplate/edit/svc_domain.cgi
+++ b/httemplate/edit/svc_domain.cgi
@@ -63,7 +63,7 @@ Available top-level domains: <% $export->option('tlds') %>
</TR>
% } else {
- <INPUT TYPE="hidden" NAME="cgp_aliases" VALUE="<% $svc_domain->cgp_aliases %>">
+ <INPUT TYPE="text" NAME="cgp_aliases" VALUE="<% $svc_domain->cgp_aliases %>">
% }
% if ( $part_svc->part_svc_column('max_accounts')->columnflag =~ /^[FA]$/ ) {
diff --git a/httemplate/edit/svc_mailinglist.cgi b/httemplate/edit/svc_mailinglist.cgi
new file mode 100644
index 000000000..c7c739daa
--- /dev/null
+++ b/httemplate/edit/svc_mailinglist.cgi
@@ -0,0 +1,25 @@
+<% include( 'elements/svc_Common.html',
+ 'table' => 'svc_mailinglist',
+ 'fields' => \@fields,
+ )
+%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
+
+my @fields = (
+ 'username',
+ { field=>'domsvc', type=>'select-svc-domain',
+ #label => 'List address domain',
+ },
+ { field=>'listnum', type=>'hidden', },
+ { field=>'listname', type=>'text', },
+ { field=>'reply_to', type=>'checkbox', value=>'Y' },
+ { field=>'remove_from', type=>'checkbox', value=>'Y' },
+ { field=>'reject_auto', type=>'checkbox', value=>'Y' },
+ { field=>'remove_to_and_cc', type=>'checkbox', value=>'Y' },
+
+);
+
+</%init>