Page MenuHomeGRNET

_form.html.erb
No OneTemporary

File Metadata

Created
Sat, Jan 17, 12:35 PM

_form.html.erb

<%= bootstrap_form_for(@fileset, url: url, method: method, layout: :horizontal,
label_col: 'col-xs-3', control_col: 'col-xs-8') do |f| %>
<div>
<%= f.text_field :name %>
<% no_remove_sign = @fileset.include_directions['file'].length <= 1 %>
<% @fileset.include_directions['file'].each do |file| %>
<%= text_with_errors_and_remove(
@fileset, :fileset, :include_files, 'Files', '/', file, no_remove_sign) %>
<% end %>
<p class='here-included' />
<div class="form-group">
<div class="col-xs-offset-3 col-xs-1">
<%= link_to '#', class: 'include_files-plus-sign', title: 'New File' do %>
<span class="glyphicon glyphicon-plus text-success"></span>
<% end %>
</div>
</div>
<hr />
<% @fileset.exclude_directions.each do |file| %>
<%= text_with_errors_and_remove(@fileset, :fileset, :exclude_directions, 'Exclude', '/an_exluded_dir', file) %>
<% end %>
<p class='here-excluded' />
<div class="form-group">
<div class="col-xs-offset-3 col-xs-1">
<%= link_to '#', class: 'exclude_directions-plus-sign', title: 'New Excluded File' do %>
<span class="glyphicon glyphicon-plus text-success"></span>
<% end %>
</div>
</div>
<%= (hidden_field_tag :job_id, @job_id) if @job_id%>
</div>
<div class="form-group">
<div class="col-xs-offset-3 col-xs-3">
<%= f.submit class: 'btn btn-success' %>
</div>
<div class="col-xs-3">
<%= link_to 'Cancel',
@job_id.present? ? edit_host_job_path(@host, @job_id) : new_host_job_path(@host),
role: 'button', class: 'btn btn-danger'%>
</div>
</div>
<% end %>
<div class='templates hidden'>
<%= text_with_errors_and_remove(@fileset, :fileset, :include_files, 'Files', '/', '') %>
<%= text_with_errors_and_remove(@fileset, :fileset, :exclude_directions, 'Exclude',
'/an_excluded_dir', '') %>
</div>

Event Timeline