codeRIT/hackathon_manager

View on GitHub
app/views/manage/schools/merge.html.haml

Summary

Maintainability
Test Coverage
= render "layouts/manage/page_title", title: "Merge School", subtitle: @school.name do
  .btn-group
    = link_to 'Cancel', manage_school_path(@school), class: 'btn btn-sm btn-outline-secondary'

%div
  .form-container
    = bs_vertical_simple_form @school, url: url_for(action: "perform_merge", controller: "schools"), html: { "data-validate" => "form" } do |f|

      %p#disclaimer
        %strong WARNING! This is an irreversible action!

      - if f.error_notification.present?
        #disclaimer
          = f.error_notification

      %p
        You are going to merge
        %strong= @school.full_name
        into:

      .form-inputs
        = f.input :id, as: :school_selection, placeholder: "My University", input_html: { "data-validate" => "presence" }, label: "Merge Into:", value: ''

      %p
        This will rename all future applications with the
        %strong= @school.full_name
        school name to this new school.

      .center
        = f.button :submit, value: 'Merge', class: 'btn-primary'