<commit_before><%= render 'requirements_templates' %>
<br/>
<div class="form-horizontal">
  <%= form_for @resource_template do |f| %>
    <% if @resource_template.errors.any? %>
      <div id="error_explanation">
        <h2>= "#{pluralize(@resource_template.errors.count, "error")} prohibited this resource template from being saved:"</h2>
        <ul>
          <% @resource_template.errors.full_messages.each do |msg| %>
            <li><%= msg %></li>
          <% end %>
        </ul>
      </div>
    <% end %>

    <h5> Associated DMP Template </h5>
    <hr/>
      <div class="controlgroup">
        <%= label_tag(:dmp_template, "DMP Template", class: "control-label") %>
        <div class="controls">
        <% if @resource_template.requirements_template_id.nil? %>
          <%= text_field_tag(:selected_requirement_template, nil, id: "selected_requirement_template_name", class: "input-xlarge") %>
        <% else %>
          <%= text_field_tag(:selected_requirement_template, @resource_template.requirements_template.name, id: "selected_requirement_template_name", class: "input-xlarge") %>
        <% end %>
        </div>
      </div>

    <h5> Basic Information </h5>
    <hr/>
    <%= f.hidden_field :requirements_template_id, id: 'requirements_template_id' %>

    <div class="control-group">
      <%= f.label :template_name,"Template Name", class: "control-label" %>
      <div class="controls">
        <%= f.text_field :name, class: "input-xlarge" %>
      </div>
    </div>

    <%= render partial: 'date_fields' , locals: { f: f } unless @resource_template.new_record? %>

    <div class="control-group">
      <%= f.label :institution, class: "control-label" %>
      <div class="controls">
        <%= f.hidden_field :institution_id, value: current_user.institution.id %>
        <%= text_field_tag :institution_name, current_user.institution.full_name, disabled: true, class: "input-xlarge" %>
      </div>
    </div>

    <h5> Optional Information </h5>
    <hr/>

    <div class="control-group">
      <%= f.label :institutional_widget, "Institutional Widget", class: "control-label" %>
      <div class="controls">
        <%= f.email_field :widget_url, class: "input-xlarge" %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :review_requirement, "Review Requirement", class: "control-label" %>
      <div class="controls">
        <%= f.radio_button :review_type, :formal_review, class: "radio inline" %>
        Formal Review Required
        <%= f.radio_button :review_type, :informal_review, class: "radio inline" %>
        Informal Review Required
        <%= f.radio_button :review_type, :no_review, class: "radio inline" %>
        No Review Required
      </div>
    </div>

    <hr/>
    <div class="actions">
      <%= f.submit 'Save Changes', class: 'btn btn-success pull-left', method: 'post' %>
    </div>
  <% end %>
</div><commit_msg>Change widget url from email field to text field<commit_after><%= render 'requirements_templates' %>
<br/>
<div class="form-horizontal">
  <%= form_for @resource_template do |f| %>
    <% if @resource_template.errors.any? %>
      <div id="error_explanation">
        <h2>= "#{pluralize(@resource_template.errors.count, "error")} prohibited this resource template from being saved:"</h2>
        <ul>
          <% @resource_template.errors.full_messages.each do |msg| %>
            <li><%= msg %></li>
          <% end %>
        </ul>
      </div>
    <% end %>

    <h5> Associated DMP Template </h5>
    <hr/>
      <div class="controlgroup">
        <%= label_tag(:dmp_template, "DMP Template", class: "control-label") %>
        <div class="controls">
        <% if @resource_template.requirements_template_id.nil? %>
          <%= text_field_tag(:selected_requirement_template, nil, id: "selected_requirement_template_name", class: "input-xlarge") %>
        <% else %>
          <%= text_field_tag(:selected_requirement_template, @resource_template.requirements_template.name, id: "selected_requirement_template_name", class: "input-xlarge") %>
        <% end %>
        </div>
      </div>

    <h5> Basic Information </h5>
    <hr/>
    <%= f.hidden_field :requirements_template_id, id: 'requirements_template_id' %>

    <div class="control-group">
      <%= f.label :template_name,"Template Name", class: "control-label" %>
      <div class="controls">
        <%= f.text_field :name, class: "input-xlarge" %>
      </div>
    </div>

    <%= render partial: 'date_fields' , locals: { f: f } unless @resource_template.new_record? %>

    <div class="control-group">
      <%= f.label :institution, class: "control-label" %>
      <div class="controls">
        <%= f.hidden_field :institution_id, value: current_user.institution.id %>
        <%= text_field_tag :institution_name, current_user.institution.full_name, disabled: true, class: "input-xlarge" %>
      </div>
    </div>

    <h5> Optional Information </h5>
    <hr/>

    <div class="control-group">
      <%= f.label :institutional_widget, "Institutional Widget", class: "control-label" %>
      <div class="controls">
        <%= f.text_field :widget_url, class: "input-xlarge" %>
      </div>
    </div>

    <div class="control-group">
      <%= f.label :review_requirement, "Review Requirement", class: "control-label" %>
      <div class="controls">
        <%= f.radio_button :review_type, :formal_review, class: "radio inline" %>
        Formal Review Required
        <%= f.radio_button :review_type, :informal_review, class: "radio inline" %>
        Informal Review Required
        <%= f.radio_button :review_type, :no_review, class: "radio inline" %>
        No Review Required
      </div>
    </div>

    <hr/>
    <div class="actions">
      <%= f.submit 'Save Changes', class: 'btn btn-success pull-left', method: 'post' %>
    </div>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.16569866757772464, 'fraction_numerical': 0.0027331738981892723, 'mean_word_length': 3.0240549828178693, 'pattern_counts': {'":': 0, '<': 145, '<?xml version=': 0, '>': 145, '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': '3943311', 'n_tokens_mistral': 1974, 'n_tokens_neox': 1835, 'n_words': 399}