From f777efe7c0b182a7eba4a596e09450427f5e6c3c Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 30 Jan 2025 17:08:29 +0100 Subject: [PATCH] Fix code of conduct during the registration --- .../_registration_info.html.haml | 7 +++++-- app/views/conference_registrations/show.html.haml | 13 +++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/conference_registrations/_registration_info.html.haml b/app/views/conference_registrations/_registration_info.html.haml index cb2a3086..33d69a07 100644 --- a/app/views/conference_registrations/_registration_info.html.haml +++ b/app/views/conference_registrations/_registration_info.html.haml @@ -1,8 +1,11 @@ - if @conference.code_of_conduct.present? + %h4 + Code of Conduct for + = @conference.short_title + = markdown @conference.code_of_conduct - if @registration.accepted_code_of_conduct = icon 'fa-solid', 'square-check' - I have read and accepted the - = link_to "Code of Conduct", code_of_conduct_conference_path(@conference.short_title) + I have read and accepted the Code of Conduct - else .checkbox %label diff --git a/app/views/conference_registrations/show.html.haml b/app/views/conference_registrations/show.html.haml index b6ba793b..3955331e 100644 --- a/app/views/conference_registrations/show.html.haml +++ b/app/views/conference_registrations/show.html.haml @@ -21,23 +21,20 @@ .fa-stack .fa-solid.fa-square-dashed .fa-solid.fa-handshake - Code of Conduct + = link_to code_of_conduct_conference_path(@conference.short_title) do + Code of Conduct %ul.fa-ul - if @registration.accepted_code_of_conduct %li.text-info %span.fa-li = icon('fa-solid', 'check') - You have accepted the - = link_to 'Code of Conduct', '#', - data: { toggle: 'modal', target: '#modal-code-of-conduct'} + You have accepted the Code of Conduct - else %li.text-warning %span.fa-li = icon('fa-solid', 'circle-exclamation') - You need to accept the - = link_to 'Code of Conduct', '#', - data: { toggle: 'modal', target: '#modal-code-of-conduct'} - = render 'conferences/code_of_conduct' + You need to accept the Code of Conduct. Please + = link_to 'edit your Registration.', edit_conference_conference_registration_path(@conference.short_title), disabled: @conference.end_date < Date.today - if @conference.surveys.for_registration.any? .row .col-md-12