<commit_before><% provide(:title, 'Institution Information') %>

<%= form_for @current_institution, html:{ :class => 'form-horizontal', multipart: true}  do |f| %>
  <%= render partial: "shared/errors", locals: {model: @current_institution } %>
  <div class="control-group">
    <%= f.label :full_name , "Institution Full Name", :class => "control-label required" %>
    <div class="controls">
	    <%= f.text_field :full_name, :class => "input-xxlarge", 'aria-required' => 'true' %>
	  </div>
  </div>

  <div class="control-group">
    <%= f.label :shib_entity_id, "Entity_id", :class => "control-label " %>
    <div class="controls">
      
      <%= f.text_field :shib_entity_id, readonly: @current_institution.is_shibboleth?, disabled: @disabled %>
      <%= content_tag(:span, '', :title => 'Shibboleth endpoint registered with the Incommon Federation. This can only be edited by the DMPTool Administrator. Contact <EMAIL> with any questions.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :shib_domain , "Shibboleth Domain", :class => "control-label "%>
    <div class="controls">
      
      <%= f.text_field :shib_domain, readonly: @current_institution.is_shibboleth? , disabled: @disabled %>
      <%= content_tag(:span, '', :title => 'This can only be edited by the DMPTool Administrator. Contact <EMAIL> with any questions.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :parent_id , "Parent Institution", :class => "control-label"%>
    <div class="controls">    

      <% if user_role_in?(:dmp_admin) %>
        <%= f.select :parent_id, 
              @categories,
              { selected:  @current_institution.parent_id, :include_blank => 'none'},
              {:disabled => true}
        %>
      <% else %>

        <%= f.select :parent_id, 
            @sub_institutions,
            #@institution_pool,
            #{:disabled => (!@current_institution.is_shibboleth? || !user_role_in?(:institutional_admin))}
            { selected:  @current_institution.parent_id, :include_blank => 'none'},
            {:disabled => true}
        %>
    
      <% end %>
      
      <%= content_tag(:span, '', :title => 'If you do not see your institution listed in the dropdown list, contact <EMAIL>.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
         
    </div>
  </div>

  <div class="control-group">
    <%= f.label :nickname, "Institution short name, or acronym", :class => "control-label" %>
    <div class="controls">
      <%= f.text_field :nickname %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :url, "Institution URL", :class => "control-label" %>
    <%= f.label :url_text, "URL Text", :class => "hide" %>
    <div class="controls">
      <%= f.text_field :url_text, placeholder: "URL Text" %>
      <%= f.text_field :url, placeholder: "URL" %>
      <%= content_tag(:span, '', :title => 'This URL will appear at the top of the DMPTool, to the right of your institution name.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :contact_info, "Administrator Contact", :class => "control-label" %>
    <%= f.label :contact_email, "Administrator Email", :class => "hide" %>
    <div class="controls">
      <%= f.text_field :contact_info, placeholder: "Name" %>
      <%= f.text_field :contact_email, placeholder: "Email" %>
      <%= content_tag(:span, '', :title => 'Person or organization that plan creators can contact in case of questions. This will appear at the top of the DMPTool, under the Institution’s URL.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">

    <%= f.label :logo, 'Institutional Logo', :class => "control-label"  %>

    <div class="controls">
      <%= image_tag @current_institution.logo.url if @current_institution.logo? %>
      <%= f.file_field :logo, :onchange =>"validateFiles(this);" %>
      <%= f.hidden_field :logo_cache %>
      <%= content_tag(:span, '', :title => 'Logos can be in .jpeg, .png, .jpg, or .gif format. They should be approximately 170 by 60, but will be re-sized on upload.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <div class="controls">
      <%= f.submit "Upload", :class => "btn" %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :desc , "Descriptive Text", :class => "control-label" %>
    <div class="controls">
      <%= f.text_area :desc, rows: 5, :class => "input-xxlarge" %>
    </div>
  </div>
	
	<div class="control-group">
		<h4>Request for Feedback - Automated Email:</h4>
		<%= f.label :submission_mailer_subject, "Subject", class: "control-label" %>
		<%= f.text_field :submission_mailer_subject, placeholder: "#{APP_CONFIG['mailer_submission_default']['subject']}", class: "input-xxlarge" %>
		<%= f.label :submission_mailer_body, "Message", class: "control-label" %>
		<div style="width: 500px;">
			<%= f.cktext_area :submission_mailer_body, :class => "input-xxlarge", :placeholder => "#{APP_CONFIG['mailer_submission_default']['body']}", width: 500 %>
			<%= content_tag(:span, '', title: 'The automated email message that users will receive after they have submitted their plan for feedback.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => true, class: 'icon questionmark tip') %>
		</div>
	</div>
	
  <div class="buttons">
    <%= f.submit "Save Changes", :class => "btn btn-green" %>
    <%= button_tag "Cancel", type: :reset, :class => "btn" %>
  </div>
<% end %>
<commit_msg>switched fedback email body form component from ck editor to text area<commit_after><% provide(:title, 'Institution Information') %>

<%= form_for @current_institution, html:{ :class => 'form-horizontal', multipart: true}  do |f| %>
  <%= render partial: "shared/errors", locals: {model: @current_institution } %>
  <div class="control-group">
    <%= f.label :full_name , "Institution Full Name", :class => "control-label required" %>
    <div class="controls">
	    <%= f.text_field :full_name, :class => "input-xxlarge", 'aria-required' => 'true' %>
	  </div>
  </div>

  <div class="control-group">
    <%= f.label :shib_entity_id, "Entity_id", :class => "control-label " %>
    <div class="controls">
      
      <%= f.text_field :shib_entity_id, readonly: @current_institution.is_shibboleth?, disabled: @disabled %>
      <%= content_tag(:span, '', :title => 'Shibboleth endpoint registered with the Incommon Federation. This can only be edited by the DMPTool Administrator. Contact <EMAIL> with any questions.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :shib_domain , "Shibboleth Domain", :class => "control-label "%>
    <div class="controls">
      
      <%= f.text_field :shib_domain, readonly: @current_institution.is_shibboleth? , disabled: @disabled %>
      <%= content_tag(:span, '', :title => 'This can only be edited by the DMPTool Administrator. Contact <EMAIL> with any questions.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :parent_id , "Parent Institution", :class => "control-label"%>
    <div class="controls">    

      <% if user_role_in?(:dmp_admin) %>
        <%= f.select :parent_id, 
              @categories,
              { selected:  @current_institution.parent_id, :include_blank => 'none'},
              {:disabled => true}
        %>
      <% else %>

        <%= f.select :parent_id, 
            @sub_institutions,
            #@institution_pool,
            #{:disabled => (!@current_institution.is_shibboleth? || !user_role_in?(:institutional_admin))}
            { selected:  @current_institution.parent_id, :include_blank => 'none'},
            {:disabled => true}
        %>
    
      <% end %>
      
      <%= content_tag(:span, '', :title => 'If you do not see your institution listed in the dropdown list, contact <EMAIL>.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
         
    </div>
  </div>

  <div class="control-group">
    <%= f.label :nickname, "Institution short name, or acronym", :class => "control-label" %>
    <div class="controls">
      <%= f.text_field :nickname %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :url, "Institution URL", :class => "control-label" %>
    <%= f.label :url_text, "URL Text", :class => "hide" %>
    <div class="controls">
      <%= f.text_field :url_text, placeholder: "URL Text" %>
      <%= f.text_field :url, placeholder: "URL" %>
      <%= content_tag(:span, '', :title => 'This URL will appear at the top of the DMPTool, to the right of your institution name.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :contact_info, "Administrator Contact", :class => "control-label" %>
    <%= f.label :contact_email, "Administrator Email", :class => "hide" %>
    <div class="controls">
      <%= f.text_field :contact_info, placeholder: "Name" %>
      <%= f.text_field :contact_email, placeholder: "Email" %>
      <%= content_tag(:span, '', :title => 'Person or organization that plan creators can contact in case of questions. This will appear at the top of the DMPTool, under the Institution’s URL.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">

    <%= f.label :logo, 'Institutional Logo', :class => "control-label"  %>

    <div class="controls">
      <%= image_tag @current_institution.logo.url if @current_institution.logo? %>
      <%= f.file_field :logo, :onchange =>"validateFiles(this);" %>
      <%= f.hidden_field :logo_cache %>
      <%= content_tag(:span, '', :title => 'Logos can be in .jpeg, .png, .jpg, or .gif format. They should be approximately 170 by 60, but will be re-sized on upload.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => 'true', :class => 'icon questionmark tip') %>
    </div>
  </div>

  <div class="control-group">
    <div class="controls">
      <%= f.submit "Upload", :class => "btn" %>
    </div>
  </div>

  <div class="control-group">
    <%= f.label :desc , "Descriptive Text", :class => "control-label" %>
    <div class="controls">
      <%= f.text_area :desc, rows: 5, :class => "input-xxlarge" %>
    </div>
  </div>
	
	<div class="control-group">
		<h4>Request for Feedback - Automated Email:</h4>
		<%= f.label :submission_mailer_subject, "Subject", class: "control-label" %>
		<%= f.text_field :submission_mailer_subject, placeholder: "#{APP_CONFIG['mailer_submission_default']['subject']}", class: "input-xxlarge" %>
		<%= f.label :submission_mailer_body, "Message", class: "control-label" %>
		<%= f.text_area :submission_mailer_body, rows: 10, :class => "input-xxlarge" %>
		<%= content_tag(:span, '', title: 'The automated email message that users will receive after they have submitted their plan for feedback.', 'data-toggle' => 'tooltip', 'data-placement' => 'right', 'data-html' => true, class: 'icon questionmark tip') %>
	</div>
	
  <div class="buttons">
    <%= f.submit "Save Changes", :class => "btn btn-green" %>
    <%= button_tag "Cancel", type: :reset, :class => "btn" %>
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.19164193867457963, 'fraction_numerical': 0.0019782393669634025, 'mean_word_length': 3.595833333333333, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 0, '>': 312, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3613497', 'n_tokens_mistral': 4156, 'n_tokens_neox': 3884, 'n_words': 1001}