diff options
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/make_appointment.html | 39 | ||||
-rw-r--r-- | httemplate/elements/menu.html | 5 | ||||
-rw-r--r-- | httemplate/elements/popup_link-make_appointment.html | 31 | ||||
-rw-r--r-- | httemplate/elements/schedule-appointment.html | 20 | ||||
-rw-r--r-- | httemplate/elements/tr-input-date-field.html | 9 | ||||
-rw-r--r-- | httemplate/elements/tr-select-hardware_type.html | 5 | ||||
-rw-r--r-- | httemplate/elements/tr-select-router_block_ip.html | 6 |
7 files changed, 105 insertions, 10 deletions
diff --git a/httemplate/elements/make_appointment.html b/httemplate/elements/make_appointment.html new file mode 100644 index 000000000..ddf377f54 --- /dev/null +++ b/httemplate/elements/make_appointment.html @@ -0,0 +1,39 @@ +<& /elements/header-popup.html &> + +% #XXX actually, the action needs to repace the top-level window with this +% #$params->{'action'} = $p. 'rt/Search/Schedule.html?'. $query; +<FORM NAME="appointment_form" METHOD="POST" ACTION="<% $p %>elements/schedule-appointment.html"> + +<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cgi->param('custnum') |h %>"> + +% my @sched_item = qsearch('sched_item', { 'disabled' => '', }); +% my @username = map $_->access_user->username, @sched_item; +% foreach my $username (@username) { + <INPUT TYPE="hidden" NAME="username" VALUE="<% $username |h %>"> +% } + +Length: +<SELECT NAME="LengthMin"> +% for ( my $hours = .5; $hours < 10.5; $hours += .5 ) { +% my $min = $hours * 60; + <OPTION VALUE="<% $min %>" + <% $min == $default_length ? 'SELECTED' : '' %> + ><% $hours %> hour<% $hours > 1 ? 's' : '' %> +% } +</SELECT> +<BR> +<BR> + +<INPUT TYPE="submit" VALUE="Schedule appointment"> + +</FORM> + +<& /elements/footer-popup.html &> +<%init> + +my $default_length = FS::Conf->new->config('default_appointment_length') || 180; + +#XXX '&pkgnum=$pkgnum";need to be for specific package/location, not just for a customer... default to active(/ordered) package in a pkg_class w/ticketing_queueid, otherwise, a popup? (well, we're already a popup now) we're getting complicated like form-creat_ticket.html + + +</%init> diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 1bab4ef46..34bba7e8c 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -328,13 +328,14 @@ tie my %report_bill_event, 'Tie::IxHash', ; tie my %report_payments, 'Tie::IxHash', - 'Payments' => [ $fsurl.'search/report_cust_pay.html', 'Payment report (by type and/or date range)' ], + 'Payments' => [ $fsurl.'search/report_cust_pay.html', 'Payment report (by type and/or date range)' ], + 'Payment application detail' => [ $fsurl.'search/report_cust_bill_pay_pkg.html', 'Line item application detail' ], ; $report_payments{'Pending Payments'} = [ $fsurl.'search/cust_pay_pending.html?magic=_date;statusNOT=done', 'Pending real-time payments' ] if $curuser->access_right('View customer pending payments'); +$report_payments{'Unapplied Payments'} = [ $fsurl.'search/report_cust_pay.html?unapplied=1', 'Unapplied payment report (by type and/or date range)' ]; $report_payments{'Voided Payments'} = [ $fsurl.'search/report_cust_pay.html?void=1', 'Voided payment report (by type and/or date range)' ] if $curuser->access_right('View customer pending payments'); -$report_payments{'Unapplied Payments'} = [ $fsurl.'search/report_cust_pay.html?unapplied=1', 'Unapplied payment report (by type and/or date range)' ]; $report_payments{'Payment Batches'} = [ $fsurl.'search/pay_batch.html', 'Payment batches (by status and/or date range)' ] if $conf->exists('batch-enable') || $conf->config('batch-enable_payby'); $report_payments{'Unapplied Payment Aging'} = [ $fsurl.'search/report_unapplied_cust_pay.html', 'Unapplied payment aging report' ]; diff --git a/httemplate/elements/popup_link-make_appointment.html b/httemplate/elements/popup_link-make_appointment.html new file mode 100644 index 000000000..60a337c04 --- /dev/null +++ b/httemplate/elements/popup_link-make_appointment.html @@ -0,0 +1,31 @@ +<%doc> + +Example: + + include('/elements/init_overlib.html') + + include( '/elements/popup_link-make-appointment.html', { #hashref or a list, either way + 'custnum' => 54, + }) + +</%doc> +<& /elements/popup_link.html, $params &>\ +<%init> + +my $params = { 'closetext' => 'Close' }; + +if (ref($_[0]) eq 'HASH') { + $params = { %$params, %{ $_[0] } }; +} else { + $params = { %$params, @_ }; +} + +#$params->{'label'} ||= 'schedule new appointment'; +$params->{'label'} ||= 'Schedule new appointment'; +$params->{'actionlabel'} ||= 'Schedule appointment'; +#$params->{'width'} ||= 350; +#$params->{'height'} ||= 220; + +$params->{'action'} = $p. '/elements/make_appointment.html?custnum='. $params->{'custnum'}; + +</%init> diff --git a/httemplate/elements/schedule-appointment.html b/httemplate/elements/schedule-appointment.html new file mode 100644 index 000000000..45a8a5bab --- /dev/null +++ b/httemplate/elements/schedule-appointment.html @@ -0,0 +1,20 @@ +<& /elements/header-popup.html &> +<h1>Scheduling appointment...</h1> +<SCRIPT TYPE="text/javascript"> + window.top.location.href = '<% $url %>'; +</SCRIPT> +<& /elements/footer-popup.html &> +<%init> + +my @username = map encode_entities($_), $cgi->param('username'); +my $LengthMin = encode_entities( $cgi->param('LengthMin') ); +my $custnum = encode_entities( $cgi->param('custnum') ); + +my $query = join('&', map "username=$_", @username). + "&LengthMin=$LengthMin". + "&custnum=$custnum"; + #XXX '&pkgnum=$pkgnum";need to be for specific package/location, not just for a customer... default to active(/ordered) package in a pkg_class w/ticketing_queueid, otherwise, a popup? we're getting complicated like form-creat_ticket.html + +my $url = $p. 'rt/Search/Schedule.html?'. $query; + +</%init> diff --git a/httemplate/elements/tr-input-date-field.html b/httemplate/elements/tr-input-date-field.html index ff9855184..f2a570b99 100644 --- a/httemplate/elements/tr-input-date-field.html +++ b/httemplate/elements/tr-input-date-field.html @@ -13,6 +13,7 @@ Example: 'usedatetime' => 1, #use DateTime->strftime to format the date # instead of Date::Format->time2str 'noinit' => 1, #first one on the page is enough + 'required' => 1, }, &> @@ -24,8 +25,9 @@ Example: <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT> % } -<TR> - <TD ALIGN="right"><% $label %></TD> +<% include('/elements/tr-td-label.html', + 'label' => $label, + 'required' => $required ) %> <TD COLSPAN=<% $colspan %>> <INPUT TYPE="text" NAME="<% $name %>" ID="<% $name %>_text" VALUE="<% $value %>"> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $name %>_button" STYLE="cursor: pointer" TITLE="<% mt('Select date') |h %>"> @@ -48,7 +50,7 @@ Example: <%init> -my($name, $value, $label, $format, $usedatetime, $noinit, $colspan); +my($name, $value, $label, $format, $usedatetime, $noinit, $colspan, $required); if ( ref($_[0]) ) { my $opt = shift; $name = $opt->{'name'}; @@ -58,6 +60,7 @@ if ( ref($_[0]) ) { $usedatetime = $opt->{'usedatetime'}; $noinit = $opt->{'noinit'}; $colspan = $opt->{'colspan'} || 1; + $required = $opt->{'required'}; } else { ($name, $value, $label, $format, $usedatetime) = @_; $colspan = 1; diff --git a/httemplate/elements/tr-select-hardware_type.html b/httemplate/elements/tr-select-hardware_type.html index c3066417b..b51afc0a5 100644 --- a/httemplate/elements/tr-select-hardware_type.html +++ b/httemplate/elements/tr-select-hardware_type.html @@ -1,5 +1,6 @@ -<TR> - <TD ALIGN="right"><% $opt{'label'} || 'Device type: ' %></TD> +<% include('/elements/tr-td-label.html', + 'label' => $opt{'label'} || 'Device type: ', + 'required' => $opt{'required'} ) %> <TD><% include('select-hardware_type.html', %opt) %></TD> </TR> diff --git a/httemplate/elements/tr-select-router_block_ip.html b/httemplate/elements/tr-select-router_block_ip.html index 11f7c4831..ee135686c 100644 --- a/httemplate/elements/tr-select-router_block_ip.html +++ b/httemplate/elements/tr-select-router_block_ip.html @@ -30,7 +30,7 @@ function clearhint_ip_addr (what) { what.value = ''; } </script> -<& /elements/tr-td-label.html, label => ($opt{'label'} || 'Router') &> +<& /elements/tr-td-label.html, label => ($opt{'label'} || 'Router'), required => $opt{'required'} &> <td> <& /elements/select-tiered.html, prefix => 'router_', tiers => [ { @@ -56,9 +56,9 @@ function clearhint_ip_addr (what) { ] &> </td></tr> -<& /elements/tr-td-label.html, label => 'IP address' &> +<& /elements/tr-td-label.html, label => 'IP address', required => $opt{'ip_addr_required'} &> <td> -% warn Dumper \%fixed; +% #warn Dumper \%fixed; % if ( exists $fixed{$ip_field} ) { <input type="hidden" id="input_ip_addr" name="<% $ip_field %>" value="<% $opt{'ip_addr'} |h%>"><% $opt{'ip_addr'} || '' %> |