Retire semantic_form_for
Also a buttload of form cleanups...
This commit is contained in:
parent
350b1ebbbe
commit
81853d1ef9
136 changed files with 1825 additions and 1441 deletions
|
|
@ -1,4 +1,3 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :title
|
||||
= remove_association_link :answer, f
|
||||
= f.text_field :title
|
||||
= remove_association_link :answer, f
|
||||
|
|
|
|||
|
|
@ -1,10 +1,17 @@
|
|||
.row
|
||||
.col-md-6
|
||||
%legend Question
|
||||
= f.input :title, label: 'Your Question'
|
||||
= f.input :question_type
|
||||
= f.input :global, label: 'Make Global',
|
||||
hint: '(Global questions are available for selection to all conferences)'
|
||||
.form-group
|
||||
= f.label :title, 'Your Question'
|
||||
= f.text_field :title, class: 'form-control'
|
||||
.form-group
|
||||
= f.select :question_type_id, QuestionType.all.pluck(:title, :id), {}, { class: 'form-control' }
|
||||
.checkbox
|
||||
%label
|
||||
= f.check_box :global
|
||||
Make Global
|
||||
%span.help-block
|
||||
Global questions are available for selection to all conferences
|
||||
.col-md-6.hidden{id: 'answers_col'}
|
||||
= dynamic_association :answers, 'Answers', f,
|
||||
hint: 'Insert your answers in the order you want them to appear'
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
Edit Question
|
||||
%h3
|
||||
"#{@question.title}"
|
||||
= semantic_form_for(@question, url: admin_conference_question_path(@conference.short_title, @question.id)) do |f|
|
||||
|
||||
= form_for(@question, url: admin_conference_question_path(@conference.short_title, @question.id)) do |f|
|
||||
= render partial: 'form', locals: {f: f}
|
||||
|
||||
= f.submit 'Save', class: 'btn btn-primary', confirm: 'Are you sure you want to make these changes?'
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
.row
|
||||
.col-md-12
|
||||
- if @questions.count > 0
|
||||
= semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
||||
= form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
||||
.questions{id: 'myquestions'}
|
||||
= render partial: 'questions'
|
||||
- if can? :update, Question.new(conference_id: @conference.id)
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
%h3{id: 'new-question-header'}
|
||||
Add new question
|
||||
.modal-body
|
||||
= semantic_form_for(@new_question, url: admin_conference_questions_path(@conference.short_title), method: :post) do |f|
|
||||
= form_for(@new_question, url: admin_conference_questions_path(@conference.short_title), method: :post) do |f|
|
||||
= render partial: 'form', locals: {f: f}
|
||||
%button{class: 'btn btn-primary'}
|
||||
Save
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue