fix appointments vs. no direct elements/ access, RT#34237, RT#23357
authorIvan Kohler <ivan@freeside.biz>
Thu, 29 Oct 2015 17:52:04 +0000 (10:52 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 29 Oct 2015 17:55:14 +0000 (10:55 -0700)
httemplate/elements/make_appointment.html [deleted file]
httemplate/elements/popup_link-make_appointment.html
httemplate/misc/make_appointment.html [new file with mode: 0644]

diff --git a/httemplate/elements/make_appointment.html b/httemplate/elements/make_appointment.html
deleted file mode 100644 (file)
index ddf377f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<& /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>
index 60a337c..3a8d37a 100644 (file)
@@ -26,6 +26,6 @@ $params->{'actionlabel'} ||= 'Schedule appointment';
 #$params->{'width'} ||= 350;
 #$params->{'height'} ||= 220;
 
-$params->{'action'} = $p. '/elements/make_appointment.html?custnum='. $params->{'custnum'};
+$params->{'action'} = $p. 'misc/make_appointment.html?custnum='. $params->{'custnum'};
 
 </%init>
diff --git a/httemplate/misc/make_appointment.html b/httemplate/misc/make_appointment.html
new file mode 100644 (file)
index 0000000..ddf377f
--- /dev/null
@@ -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>