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,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' }
|
||||
|
|
|
|||
11
app/views/admin/roles/edit.html.haml
Normal file
11
app/views/admin/roles/edit.html.haml
Normal 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'
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue