mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 08:43:37 +02:00
Refactor admin user form #2743
This commit is contained in:
parent
42c8e28f0b
commit
4212196569
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
= form_for([:admin, @admin_user], html: { class: 'form-horizontal' }) do |f|
|
= form_for([:admin, @admin_user], html: { class: 'form-horizontal', autocomplete: 'off' }) do |f|
|
||||||
= render 'shared/full_errors', object: @admin_user
|
= render 'shared/full_errors', object: @admin_user
|
||||||
|
|
||||||
.row
|
.row
|
||||||
|
@ -14,12 +14,12 @@
|
||||||
- not_required = @admin_user.new_record? ? '' : 'not-required'
|
- not_required = @admin_user.new_record? ? '' : 'not-required'
|
||||||
= f.label :password, class: not_required
|
= f.label :password, class: not_required
|
||||||
.col-md-8
|
.col-md-8
|
||||||
= f.password_field(:password, class: 'form-control')
|
= f.text_field(:password, class: 'form-control')
|
||||||
.form-group
|
.form-group
|
||||||
.col-md-4.control-label
|
.col-md-4.control-label
|
||||||
= f.label :password_confirmation, class: not_required
|
= f.label :password_confirmation, class: not_required
|
||||||
.col-md-8
|
.col-md-8
|
||||||
= f.password_field(:password_confirmation, class: 'form-control')
|
= f.text_field(:password_confirmation, class: 'form-control')
|
||||||
|
|
||||||
%hr
|
%hr
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
%hr
|
%hr
|
||||||
.row
|
.row
|
||||||
.col-md-8.text-right
|
.col-md-8.text-right
|
||||||
= button_tag(t(:save), class: 'btn btn-primary')
|
= button_tag(t(:save), class: 'btn btn-warning')
|
||||||
|
|
||||||
:coffee
|
:coffee
|
||||||
$("#admin_user_password").removeAttr('required')
|
$("#admin_user_password").removeAttr('required')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue