Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<% @wmon = (1..12).to_a.unshift('--') %>
<% @wday = (1..31).to_a.unshift('--') %>
<div class="form-group <% if f.object.class.multiple? key %>multi_value<% end %>">
<p class="text-bold">Date Coverage</p>
<p class="help-block">The date range the work's data was created, as determined by the creator.</p>
<% if f.object.class.multiple? key %>
<ul class="listing">
<li class="field-wrapper">
<% end %>
<div class="row">
<div class="col-md-6">
<div class="row">
<fieldset>
<div class="col-md-12">
<legend class="legend-label">Start Date</legend>
</div>
<div class="col-md-4">
<label for="date_coverage_1_year" data-label="Date">Year</label>
<input type="text" id="date_coverage_1_year" name="date_coverage_1_year[]" class="form-control"></input>
</div>
<div class="col-md-3">
<label for="date_coverage_1_month">Month</label>
<%= select_tag :date_coverage_1_month, options_for_select(@wmon), { class: 'form-control'} %>
</div>
<div class="col-md-3">
<label for="date_coverage_1_day">Day</label>
<%= select_tag :date_coverage_1_day, options_for_select(@wday), { class: 'form-control'} %>
</div>
</fieldset>
</div>
</div>
<div class="col-md-6">
<div class="row">
<fieldset>
<div class="col-md-12">
<legend class="legend-label">End Date</legend>
</div>
<div class="col-md-4">
<label for="date_coverage_2_year" data-label="Date">Year</label>
<input type="text" id="date_coverage_2_year" name="date_coverage_2_year[]" class="form-control"></input>
</div>
<div class="col-md-3">
<label for="date_coverage_2_month">Month</label>
<%= select_tag :date_coverage_2_month, options_for_select(@wmon), { class: 'form-control'} %>
</div>
<div class="col-md-3">
<label for="date_coverage_2_day">Day</label>
<%= select_tag :date_coverage_2_day, options_for_select(@wday), { class: 'form-control'} %>
</div>
</fieldset>
</div>
</div>
</div>
<% if f.object.class.multiple? key %>
</li>
</ul>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.