Fixing redirects
This commit is contained in:
@ -26,7 +26,7 @@ All Reservations
|
||||
<tr>
|
||||
<td>{{ .ID}}</td>
|
||||
<td>
|
||||
<a href="/admin/reservations/all/{{.ID}}">
|
||||
<a href="/admin/reservations/all/{{.ID}}/show">
|
||||
{{ .LastName}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -26,7 +26,7 @@ New Reservations
|
||||
<tr>
|
||||
<td>{{ .ID}}</td>
|
||||
<td>
|
||||
<a href="/admin/reservations/new/{{.ID}}">
|
||||
<a href="/admin/reservations/new/{{.ID}}/show">
|
||||
{{ .LastName}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -49,7 +49,7 @@ Reservations Calendar
|
||||
{{range $index := iterate $dim}}
|
||||
<td class="text-center">
|
||||
{{if gt (index $reservations (printf "%s-%s-%d" $curYear $curMonth (add $index 1))) 0}}
|
||||
<a href="/admin/reservations/cal/{{index $reservations (printf "%s-%s-%d" $curYear $curMonth (add $index 1))}}">
|
||||
<a href="/admin/reservations/cal/{{index $reservations (printf "%s-%s-%d" $curYear $curMonth (add $index 1))}}/show?y={{$curYear}}&m={{$curMonth}}">
|
||||
<span class="text-danger">R</span>
|
||||
</a>
|
||||
{{else}}
|
||||
|
@ -15,6 +15,8 @@ Reservation
|
||||
</p>
|
||||
<form method="post" action="/admin/reservations/{{$src}}/{{$res.ID}}" class="" novalidate>
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
<input type="hidden" name="year" value="{{index .StringMap "year"}}">
|
||||
<input type="hidden" name="month" value="{{index .StringMap "month"}}">
|
||||
|
||||
<div class="form-group mt-5">
|
||||
<label for="first_name">First name:</label>
|
||||
@ -55,7 +57,9 @@ Reservation
|
||||
{{else}}
|
||||
<a href="/admin/reservations-{{$src}}" class="btn btn-warning">Cancel</a>
|
||||
{{end}}
|
||||
{{ if eq $res.Processed 0}}
|
||||
<a href="#" class="btn btn-info" onclick="processRes({{$res.ID}})">Mark as Processed</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
|
||||
@ -78,7 +82,7 @@ function processRes(id) {
|
||||
msg: 'Are you sure?',
|
||||
callback: function(result) {
|
||||
if (result != false) {
|
||||
window.location.href = "/admin/process-reservation/{{$src}}/" + id;
|
||||
window.location.href = "/admin/process-reservation/{{$src}}/" + id + "/do?y={{index .StringMap "year"}}&m={{index .StringMap "month"}}";
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -89,7 +93,7 @@ function deleteRes(id) {
|
||||
msg: 'Are you sure?',
|
||||
callback: function(result) {
|
||||
if (result != false) {
|
||||
window.location.href = "/admin/delete-reservation/{{$src}}/" + id;
|
||||
window.location.href = "/admin/delete-reservation/{{$src}}/" + id + "/do?y={{index .StringMap "year"}}&m={{index .StringMap "month"}}";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user