<commit_before><% self.extend(CustomFormsPlugin::Helper) %>

<%= f.error_messages %>
<%= required labelled_form_field _('Name'), f.text_field(:name) %>
<%= labelled_form_field(_('Period'), (
  date_range_field('form[begining]', 'form[ending]', @form.begining, @form.ending,
                   '%Y-%m-%d %H:%M',
                   { :time => true, :change_month => true, :change_year => true,
                     :date_format => 'yy-mm-dd', :time_format => 'hh:mm' },
                     { :size => 14 })
)) %>
<%= labelled_form_field _('Access'), f.select(:access, access_options(profile))%>
<% if profile.organization? %>
  <%= labelled_form_field _('Triggered on membership request as requirement for approval'), f.check_box(:for_admission) %>
  <%= labelled_form_field _('Triggered after membership'), f.check_box(:on_membership) %>
<% end %>
<%= labelled_form_field _('Description'), f.text_area(:description, :style => 'width: 100%') %>

<h2><%= _('Fields') %></h2>

<ul class='field-list'>
  <% f.fields_for :fields do |builder| %>
    <li>
      <%= render partial_for_class(builder.object.class), :f => builder %>
    </li>
  <% end %>
</ul>

<div class="addition-buttons">
  <%= button(:add, _('Add a new text field'), '#', :onclick => "customFormsPlugin.addFields(this, 'fields', #{html_for_field(f, :fields, CustomFormsPlugin::TextField).to_json}); return false")%>
  <%= button(:add, _('Add a new select field'), '#', :onclick => "customFormsPlugin.addFields(this, 'fields', #{html_for_field(f, :fields, CustomFormsPlugin::SelectField).to_json}); return false")%>
</div>
<commit_msg>Puts label and checkbox horizontally aligned<commit_after><% self.extend(CustomFormsPlugin::Helper) %>

<%= f.error_messages %>
<%= required labelled_form_field _('Name'), f.text_field(:name) %>
<%= labelled_form_field(_('Period'), (
  date_range_field('form[begining]', 'form[ending]', @form.begining, @form.ending,
                   '%Y-%m-%d %H:%M',
                   { :time => true, :change_month => true, :change_year => true,
                     :date_format => 'yy-mm-dd', :time_format => 'hh:mm' },
                     { :size => 14 })
)) %>
<%= labelled_form_field _('Access'), f.select(:access, access_options(profile))%>
<% if profile.organization? %>
  <p>
  <%= labelled_check_box _('Triggered on membership request as requirement for approval'), 'form[for_admission]', '1', @form.for_admission %>
  <br/>
  <%= labelled_check_box _('Triggered after membership'), 'form[on_membership]', '1', @form.on_membership %>
  </p>
<% end %>
<%= labelled_form_field _('Description'), f.text_area(:description, :style => 'width: 100%') %>

<h2><%= _('Fields') %></h2>

<ul class='field-list'>
  <% f.fields_for :fields do |builder| %>
    <li>
      <%= render partial_for_class(builder.object.class), :f => builder %>
    </li>
  <% end %>
</ul>

<div class="addition-buttons">
  <%= button(:add, _('Add a new text field'), '#', :onclick => "customFormsPlugin.addFields(this, 'fields', #{html_for_field(f, :fields, CustomFormsPlugin::TextField).to_json}); return false")%>
  <%= button(:add, _('Add a new select field'), '#', :onclick => "customFormsPlugin.addFields(this, 'fields', #{html_for_field(f, :fields, CustomFormsPlugin::SelectField).to_json}); return false")%>
</div>

{'fraction_non_alphanumeric': 0.20828258221680876, 'fraction_numerical': 0.0048721071863581, 'mean_word_length': 4.558375634517766, 'pattern_counts': {'":': 0, '<': 54, '<?xml version=': 0, '>': 74, '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': '140539', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1079, 'n_words': 216}