diff --git a/app/views/admin/conferences/_recent_users.html.haml b/app/views/admin/conferences/_recent_users.html.haml index 83234afa..790e386b 100644 --- a/app/views/admin/conferences/_recent_users.html.haml +++ b/app/views/admin/conferences/_recent_users.html.haml @@ -14,10 +14,7 @@ %td= link_to user.email, admin_user_path(user.id) %td= user.created_at.strftime('%m/%d/%Y') %td - = check_box_tag user.id, user.id, user.confirmed?, - url: "/admin/users/#{user.id}/toggle_confirmation?user[to_confirm]=", - class: 'switch-checkbox', - readonly: true + = user.confirmed? ? 'Yes' : 'No' - else %h5.text-warning.text-center No sign ups! diff --git a/app/views/admin/events/registrations.html.haml b/app/views/admin/events/registrations.html.haml index f86f8325..70204369 100644 --- a/app/views/admin/events/registrations.html.haml +++ b/app/views/admin/events/registrations.html.haml @@ -32,7 +32,7 @@ %td= event_registration.email %td= event_registration.created_at %td - = check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "/admin/conferences/#{@conference.short_title}/program/events/#{@event.id}/toggle_attendance?events_registration_id=#{event_registration.id}&&event_registration[attended]=" + = check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "#{toggle_attendance_admin_conference_program_event_path(@conference, @event, events_registration_id: event_registration)}&&event_registration[attended]=" %td - if event_registration.registration.attended %i.fa.fa-check.text-success diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 9de061d4..40ec8a7a 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -6,12 +6,12 @@ Confirmed? - if can? :toggle_confirmation, @user = check_box_tag @user.id, @user.id, @user.confirmed?, - url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=", + url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=", class: 'switch-checkbox', readonly: false - else = check_box_tag @user.id, @user.id, @user.confirmed?, - url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=", + url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=", class: 'switch-checkbox', readonly: true = f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.' diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 11933454..c9048be4 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -36,12 +36,12 @@ %td - if can? :toggle_confirmation, @user = check_box_tag @user.id, @user.id, @user.confirmed?, - url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=", + url: "#{toggle_confirmation_admin_user_path(@user)}?user[to_confirm]=", class: 'switch-checkbox', readonly: false - else = check_box_tag @user.id, @user.id, @user.confirmed?, - url: "/admin/users/#{@user.id}/toggle_confirmation?user[to_confirm]=", + url: "#{toggle_confirmation_admin_user_path(@user)}?user[to_confirm]=", class: 'switch-checkbox', readonly: true - else