<commit_before><%= form_for ([@requirement.requirements_template, @requirement]), html: { :class => 'form-horizontal' } do |f| %>
  <%= render partial: "shared/errors", locals: {model: @requirement } %>
  <fieldset>
    <div class="control-group">
      <%= f.hidden_field :parent_id %>
      <%= f.check_box :group, id: 'if_group', style: 'display: none;' %>
    </div>
    <div class="control-group">
      <% if params[:node_type] == 'group'%>
        <%= f.label :text_brief, 'Group Label', :class => 'control-label required' %>
      <% else %>
        <%= f.label :text_brief, 'Requirement Label', :class => 'control-label required' %>
      <% end %>
      <div class="controls">
        <%= f.text_field(:text_brief, :class => 'input-block-level', 'aria-required' => 'true') %>
      </div>
    </div>

    <% if params[:node_type] == 'group'%>
      <div class="control-group">
        <%= f.label :text_full, 'Detailed Question', :class => 'control-label' %>
        <div class="controls">
          <%= f.text_area(:text_full, rows: 5, :class => 'input-block-level') %>
        </div>
      </div>
    <% else %>
      <div class="control-group">
        <%= f.label :text_full, 'Detailed Question', :class => 'control-label required' %>
        <div class="controls">
          <%= f.text_area(:text_full, rows: 5, :class => 'input-block-level', 'aria-required' => 'true') %>
        </div>
      </div>
    <% end %>

    <div class="control-group" id="obligation">
      <p class="control-label">Obligation</p>
      <div class="controls checkbox-controls">
        <%= f.radio_button :obligation, :mandatory, :class => 'radio inline', :id => 'mandatory'%>
        <%= label_tag :mandatory, "Mandatory", :class => "radio-label" %><br/>
        <%= f.radio_button :obligation, :mandatory_applicable, :class => 'radio inline', :id => 'mandatory_applicable'%>
        <%= label_tag :mandatory_applicable, "Mandatory If Applicable", :class => "radio-label" %><br/>
        <%= f.radio_button :obligation, :recommended, :class => 'radio inline', :id => 'recommended' %>
        <%= label_tag :recommended, "Recommended", :class => "radio-label" %><br/>
        <% if @requirement.new_record? %>
          <%= f.radio_button :obligation, :optional, checked: true, :class => 'radio inline', :id => 'optional' %><commit_msg>Reset the Obligation radio button on cancel.<commit_after><%= form_for ([@requirement.requirements_template, @requirement]), html: { :class => 'form-horizontal' } do |f| %>
  <%= render partial: "shared/errors", locals: {model: @requirement } %>
  <fieldset>
    <div class="control-group">
      <%= f.hidden_field :parent_id %>
      <%= f.check_box :group, id: 'if_group', style: 'display: none;' %>
    </div>
    <div class="control-group">
      <% if params[:node_type] == 'group'%>
        <%= f.label :text_brief, 'Group Label', :class => 'control-label required' %>
      <% else %>
        <%= f.label :text_brief, 'Requirement Label', :class => 'control-label required' %>
      <% end %>
      <div class="controls">
        <%= f.text_field(:text_brief, :class => 'input-block-level', 'aria-required' => 'true') %>
      </div>
    </div>

    <% if params[:node_type] == 'group'%>
      <div class="control-group">
        <%= f.label :text_full, 'Detailed Question', :class => 'control-label' %>
        <div class="controls">
          <%= f.text_area(:text_full, rows: 5, :class => 'input-block-level') %>
        </div>
      </div>
    <% else %>
      <div class="control-group">
        <%= f.label :text_full, 'Detailed Question', :class => 'control-label required' %>
        <div class="controls">
          <%= f.text_area(:text_full, rows: 5, :class => 'input-block-level', 'aria-required' => 'true') %>
        </div>
      </div>
    <% end %>

    <div class="control-group" id="obligation">
      <p class="control-label">Obligation</p>
      <div class="controls checkbox-controls">
        <%= f.radio_button :obligation, :mandatory, :class => 'radio inline', :id => 'mandatory'%>
        <%= label_tag :mandatory, "Mandatory", :class => "radio-label" %><br/>
        <%= f.radio_button :obligation, :mandatory_applicable, :class => 'radio inline', :id => 'mandatory_applicable'%>
        <%= label_tag :mandatory_applicable, "Mandatory If Applicable", :class => "radio-label" %><br/>
        <%= f.radio_button :obligation, :recommended, :class => 'radio inline', :id => 'recommended' %>
        <%= label_tag :recommended, "Recommended", :class => "radio-label" %><br/>
        <% if params[:node_type] == 'group' && @requirement.new_record? %>
          <%= f.radio_button :obligation, :optional, :class => 'radio inline', :id => 'optional' %>
          <%= label_tag :optional, "Optional", :class => "radio-label" %>
        <% elsif @requirement.new_record? %>
          <%= f.radio_button :obligation, :optional, checked: true, :class => 'radio inline', :id => 'optional' %>
{'fraction_non_alphanumeric': 0.20513857980983208, 'fraction_numerical': 0.0008092251669026907, 'mean_word_length': 3.2005097706032286, 'pattern_counts': {'":': 0, '<': 100, '<?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': '4902467', 'n_tokens_mistral': 1720, 'n_tokens_neox': 1595, 'n_words': 351}