Show More
Commit Description:
wip
Commit Description:
wip
References:
File last commit:
Show/Diff file:
Action:
app/views/main/_submission_box.html.haml
| 19 lines
| 903 B
| text/x-haml
| HamlLexer
|
r869 | = form_with url: submit_main_path, multipart: true, class: 'form' do |form| | |||
r555 | - if @submission and @submission.errors.any? | |||
#error_explanation | ||||
.alert.alert-danger | ||||
%h3= "#{pluralize(@submission.errors.count, "error")} prohibited this user from being saved:" | ||||
%ul | ||||
- @submission.errors.full_messages.each do |msg| | ||||
%li= msg | ||||
r869 | .row.mb-2 | |||
.col-sm-2 | ||||
r872 | = form.label :submission, 'Problem:', class: 'col-form-label' | |||
r869 | .col-sm-10 | |||
= select 'submission', 'problem_id', [[(t 'main.specified_in_header'),'-1']] + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", p.id]}, {:selected => '-1'}, { class: 'select2 form-control', style: "width: 100%" } | ||||
.row.mb-2 | ||||
.col-sm-2 | ||||
r872 | = form.label :file, 'File:', class: 'col-form-label' | |||
r869 | .col-sm-10 | |||
= form.file_field :file, class: 'form-control' | ||||
= form.submit 'Submit', class: 'btn btn-primary' | ||||