ddf377f54782563c12b2adb06400b461ccba07fd
[freeside.git] / httemplate / elements / 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 %>elements/schedule-appointment.html">
6
7 <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cgi->param('custnum') |h %>">
8
9 % my @sched_item = qsearch('sched_item', { 'disabled' => '', });
10 % my @username = map $_->access_user->username, @sched_item;
11 % foreach my $username (@username) { 
12   <INPUT TYPE="hidden" NAME="username" VALUE="<% $username |h %>">
13 % }
14
15 Length: 
16 <SELECT NAME="LengthMin">
17 %  for ( my $hours = .5; $hours < 10.5; $hours += .5 ) {
18 %    my $min = $hours * 60;
19      <OPTION VALUE="<% $min %>"
20              <% $min == $default_length ? 'SELECTED' : '' %>
21      ><% $hours %> hour<% $hours > 1 ? 's' : '' %>
22 %  }
23 </SELECT>
24 <BR>
25 <BR>
26
27 <INPUT TYPE="submit" VALUE="Schedule appointment">
28
29 </FORM>
30
31 <& /elements/footer-popup.html &>
32 <%init>
33
34 my $default_length = FS::Conf->new->config('default_appointment_length') || 180;
35
36 #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
37
38
39 </%init>