Retire semantic_form_for

Also a buttload of form cleanups...
This commit is contained in:
Henne Vogelsang 2022-02-23 17:52:16 +01:00
parent 350b1ebbbe
commit 81853d1ef9
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
136 changed files with 1825 additions and 1441 deletions

View file

@ -1,15 +1,5 @@
.row
.col-md-12
.page-header
%h2
Role
= @role.name.titleize
.text-muted
= @role.description
= semantic_form_for @role, url: @url do |f|
.row
.col-md-5
= f.input :description, input_html: { autofocus: true }
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= form_for @role, url: @url do |f|
.form-group
= f.label :description
= f.text_field :description, autofocus: true, class: 'form-control'
= f.submit nil, { class: 'btn btn-primary' }

View file

@ -0,0 +1,11 @@
.row
.col-md-12
.page-header
%h2
Role
= @role.name.titleize
.text-muted
= @role.description
.row
.col-md-5
= render partial: 'form'

View file

@ -17,16 +17,15 @@
= link_to @track.name, admin_conference_program_track_path(@conference.short_title, @track)
.row.col-md-3
- if ( can? :toggle_user, @role ) && !@role.new_record?
.row
.col-md-3
- if ( can? :toggle_user, @role ) && !@role.new_record?
= semantic_form_for :user, url: @url, method: :post do |u|
= u.label 'Add user by email: '
.input-group
= u.input :email, input_html: { autofocus: true }, label: false, placeholder: "User's email"
.input-group-btn
= u.submit 'Add', id: 'user-add', class: 'btn btn-primary'
= form_for :user, url: @url, method: :post do |f|
.form-group
= f.label :email, 'Add user by email: '
= f.email_field :email, autofocus: true, placeholder: "User's email", class: 'form-control'
= f.submit 'Add', id: 'user-add', class: 'btn btn-primary'
.row
.col-md-12