
%div#permission_form_form
  %h4
    New permission form:
  = form_for :portal_permission, :action => :create do |f|
    %table
      %tr
        %td Project:
        %td= select_tag 'portal_permission[project_id]', options_from_collection_for_select(projects, "id", "name", selected: params[:project_id]), prompt: "Select project..."
        %td
      %tr
        %td Name:
        %td= f.text_field :name
        %td
      %tr
        %td Url:
        %td= f.text_field :url
        %td=f.submit "Create"
      %tr
        %td#permission_form_list{:colspan => 3}
          %div
            - permission_forms.each do |perm|
              %span.existing_permission
                %span.name= perm.fullname
                %span.url
                  - if perm.url
                    %a{:href => perm.url, :target => "_blank"}="(link)"
                %span.delete
                  =link_to "✖",
                    remove_form_admin_permission_form_path(perm),
                    :confirm => "Delete Permission Form?"


%div#permission_form_form
  %h4
    New permission form:
  = form_for :portal_permission, :action => :create do |f|
    %table
      %tr
        %td Project:
        %td= select_tag 'portal_permission[project_id]', options_from_collection_for_select(projects, "id", "name", selected: params[:project_id]), prompt: "Select project..."
        %td
      %tr
        %td Name:
        %td= f.text_field :name
        %td
      %tr
        %td Url:
        %td= f.text_field :url
        %td=f.submit "Create"
      %tr
        %td#permission_form_list{:colspan => 3}
          %div
            - permission_forms.each do |perm|
              %span.existing_permission
                %span.name= perm.fullname
                %span.url
                  - if perm.url
                    %a{:href => perm.url, :target => "_blank"}="(link)"
                %span.delete
                  =link_to "✖",
                    remove_form_admin_permission_form_path(perm),
                    :confirm => raw("Delete Permission Form?&#10;&#10;WARNING: All related student permissions will be removed and researchers will no longer be able to view the students' data in reports if you delete this form.")

Add warning that deleting permission form removes access to student data
Add warning that deleting permission form removes access to student data

