De-activate buttons in registrations#show when conference has ended, so that user cannot edit registration details after the conference is over.
This commit is contained in:
parent
fcca0e71d2
commit
393f26c679
1 changed files with 2 additions and 2 deletions
|
|
@ -101,9 +101,9 @@
|
||||||
.col-md-12
|
.col-md-12
|
||||||
-if @registration
|
-if @registration
|
||||||
.btn-group-vertical.pull-right
|
.btn-group-vertical.pull-right
|
||||||
= link_to 'Edit your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success'
|
= link_to 'Edit your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success', disabled: @conference.end_date < Date.today
|
||||||
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),
|
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),
|
||||||
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?'
|
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?', disabled: @conference.end_date < Date.today
|
||||||
- else
|
- else
|
||||||
= link_to 'Register', new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'
|
= link_to 'Register', new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue