courseplatform/app/views/admin/weeks/partials/_form.html.erb

19 lines
548 B
Plaintext

<%= form_with(model: [:admin, week]) do |form| %>
<% if week.errors.any? %>
<%= error_messages(week) %>
<% end %>
<%= form.hidden_field :course_id %>
<div class="form-row">
<div class="form-group col-md-6">
<%= form.label :name %>
<%= form.text_field :name, class: 'form-control' %>
</div>
<div class="form-group col-md-6">
<%= form.label :description %>
<%= form.text_area :description, class: 'form-control' %>
</div>
</div>
<%= form.submit 'Zapisz', class: 'btn btn-primary' %>
<% end %>