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
|
|
@ -6,15 +6,21 @@
|
|||
%h3.panel-title
|
||||
Sign in
|
||||
.panel-body
|
||||
= semantic_form_for '', method: :post, enctype: 'application/x-www-form-urlencoded', url: @login_url do |f|
|
||||
= f.input :url, as: :hidden, input_html: { value: @back_url }
|
||||
= f.input :context, as: :hidden, input_html: { value: @context }
|
||||
= f.input :proxypath, as: :hidden, input_html: { value: @proxypath }
|
||||
|
||||
= f.input :username, input_html: { autofocus: true }
|
||||
= f.input :password, as: :password
|
||||
= form_for(@login_url, method: :post, enctype: 'application/x-www-form-urlencoded', id: 'session' do |f|
|
||||
= f.hidden_field :url, value: @back_url
|
||||
= f.hidden_field :context, value: @context
|
||||
= f.hidden_field :proxypath, value: @proxypath
|
||||
|
||||
.form-group
|
||||
= f.label :username, "Username"
|
||||
%abbr{title: 'This field is required'} *
|
||||
= f.text_field :username, autofocus: true, required: true, class: 'form-control', placeholder: 'Username'
|
||||
.form-group
|
||||
= f.label :password, "Password"
|
||||
%abbr{title: 'This field is required'} *
|
||||
= f.password_field :password, required: true, class: 'form-control', placeholder: 'Password'
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, label: 'Sign In', button_html: { class: 'btn btn-success' }
|
||||
%button{type: 'submit', class: 'btn btn-success'}
|
||||
Sign In
|
||||
|
||||
= render partial: 'devise/shared/help'
|
||||
|
|
|
|||
|
|
@ -3,17 +3,21 @@
|
|||
.col-md-6.col-md-offset-3
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title
|
||||
Sign in (TEST MODE)
|
||||
%h3 Sign In (TEST MODE)
|
||||
%p.text-muted
|
||||
Just fill out all the details and you're logged in.
|
||||
.panel-body
|
||||
= semantic_form_for "", method: :post, enctype: 'application/x-www-form-urlencoded', url: @login_url do |f|
|
||||
= f.input :username, input_html: { autofocus: true }
|
||||
|
||||
- if ::Devise.ichain_force_test_attributes.blank?
|
||||
= form_tag(@login_url, method: :post, enctype: 'application/x-www-form-urlencoded', id: 'session') do
|
||||
.form-group
|
||||
= label_tag :username, "Username"
|
||||
= text_field_tag :username, "", :autofocus => true, :placeholder => 'Username', :class => 'form-control', :required => "required"
|
||||
.form-group
|
||||
- @fields.each do |field|
|
||||
= f.input "attributes[#{field}]", label: field.to_s.humanize
|
||||
|
||||
= label_tag "attributes[#{field}]", field.to_s.humanize
|
||||
= text_field_tag "attributes[#{field}]", nil, :class => 'form-control', :required => "required"
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, label: 'Sign In', button_html: { class: 'btn btn-success' }
|
||||
%button{type: 'submit', class: 'btn btn-success'}
|
||||
Sign In
|
||||
|
||||
= render partial: 'devise/shared/help'
|
||||
- if devise_mapping.ichain_registerable?
|
||||
= link_to "Sign up", new_ichain_registration_path(resource_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue