Skip to content

Commit

Permalink
#71 - show cancel button only if the ticket is free of charge
Browse files Browse the repository at this point in the history
  • Loading branch information
cbellone committed Sep 2, 2015
1 parent 596d706 commit d2cdb27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/main/java/alfio/controller/ReservationController.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public String showConfirmationPage(@PathVariable("eventName") String eventName,
model.addAttribute("countries", ticketHelper.getLocalizedCountries(RequestContextUtils.getLocale(request)));
model.addAttribute("pageTitle", "reservation-page-complete.header.title");
model.addAttribute("event", event.get());
model.addAttribute("showTicketCancelButton", enableFreeCancellation);
model.asMap().putIfAbsent("validationResult", ValidationResult.success());
return "/event/reservation-page-complete";
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/templates/event/assign-ticket-form.ms
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#assigned}}
<div class="wMarginBottom">
<p>{{#i18n}}reservation-page-complete.assigned-to [{{fullName}}] [{{email}}]{{/i18n}} {{#showTicketCancelButton}}<a href="#unbind-form-{{uuid}}" id="unbind-{{uuid}}" class="btn btn-xs btn-danger unbind-btn" data-ticket-uid="{{uuid}}"><i class="fa fa-eraser"></i> {{#i18n}}reservation-page-complete.release-button.text{{/i18n}}</a>{{/showTicketCancelButton}}</p>
{{#showTicketCancelButton}}
<p>{{#i18n}}reservation-page-complete.assigned-to [{{fullName}}] [{{email}}]{{/i18n}} {{#cancellationEnabled}}<a href="#unbind-form-{{uuid}}" id="unbind-{{uuid}}" class="btn btn-xs btn-danger unbind-btn" data-ticket-uid="{{uuid}}"><i class="fa fa-eraser"></i> {{#i18n}}reservation-page-complete.release-button.text{{/i18n}}</a>{{/cancellationEnabled}}</p>
{{#cancellationEnabled}}
<div class="hide-by-default" id="unbind-form-{{uuid}}" tabindex="-1" role="dialog" aria-labelledby="modalTitle" aria-hidden="true" data-cancel-ticket="">
<form name="cancel-ticket" method="POST" action="{{request.contextPath}}/event/{{event.shortName}}/reservation/{{reservationId}}/cancel-ticket">
<input type="hidden" name="ticketId" value="{{uuid}}" />
Expand All @@ -14,7 +14,7 @@
</div>
</form>
</div>
{{/showTicketCancelButton}}
{{/cancellationEnabled}}
<div class="row">
<div class="col-lg-3 col-sm-6 col-xs-12 wMarginBottom"><a href="{{request.contextPath}}/event/{{event.shortName}}/reservation/{{reservationId}}/{{urlSuffix}}" class="btn btn-primary btn-block"><i class="fa fa-search-plus"></i> {{#i18n}}reservation-page-complete.show-ticket{{/i18n}}</a></div>
<div class="col-lg-3 col-sm-6 col-xs-12 wMarginBottom"><a href="{{request.contextPath}}/event/{{event.shortName}}/reservation/{{reservationId}}/{{uuid}}/download-ticket" class="btn btn-primary btn-block"><i class="fa fa-download"></i> {{#i18n}}reservation-page-complete.download-ticket{{/i18n}}</a></div>
Expand Down

0 comments on commit d2cdb27

Please sign in to comment.