default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / misc / make_appointment.html
1 <& /elements/header-popup.html &>
2
3 % #XXX actually, the action needs to repace the top-level window with this
4 % #$params->{'action'} = $p. 'rt/Search/Schedule.html?'. $query;
5 <FORM NAME="appointment_form" METHOD="POST" ACTION="<% $p %>misc/schedule-appointment.html">
6
7 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cgi->param('custnum') |h %>">
8
9 <TABLE>
10 <TR>
11 <TD STYLE="text-align: right">Length:</TD>
12 <TD>
13 <SELECT NAME="LengthMin">
14 %  for ( my $hours = .5; $hours < 10.5; $hours += .5 ) {
15 %    my $min = $hours * 60;
16      <OPTION VALUE="<% $min %>"
17              <% $min == $default_length ? 'SELECTED' : '' %>
18      ><% $hours %> hour<% $hours > 1 ? 's' : '' %>
19 %  }
20 </SELECT>
21 </TD>
22 </TR>
23
24 % my @sched_item = qsearch('sched_item', { 'disabled' => '', });
25 % my @username = map $_->access_user->username, @sched_item;
26
27 <TR>
28 <TD STYLE="text-align: right">Installer:</TD>
29 <TD>
30 <SELECT NAME="username" ID="username_select" MULTIPLE>
31 % foreach my $username (@username) { 
32   <OPTION SELECTED><% $username |h %></OPTION>
33 % }
34 </SELECT>
35 </TD>
36 </TR>
37
38 </TABLE>
39
40 <BR>
41 <INPUT TYPE="submit" VALUE="Schedule appointment">
42
43 </FORM>
44
45 <& /elements/footer-popup.html &>
46 <%init>
47
48 my $default_length = FS::Conf->new->config('default_appointment_length') || 180;
49
50 #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
51
52
53 </%init>