2014-06-23 19:07:50 +03:00
|
|
|
= semantic_form_for [:admin, @user] do |f|
|
2014-08-12 11:51:59 +03:00
|
|
|
= f.inputs 'Basic Information' do
|
2017-01-10 17:07:28 +02:00
|
|
|
- unless @user.new_record?
|
|
|
|
|
.pull-right
|
|
|
|
|
%b
|
|
|
|
|
Confirmed?
|
|
|
|
|
- if can? :toggle_confirmation, @user
|
|
|
|
|
= check_box_tag @user.id, @user.id, @user.confirmed?,
|
2019-03-30 21:57:45 +02:00
|
|
|
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
|
2017-01-10 17:07:28 +02:00
|
|
|
class: 'switch-checkbox',
|
2018-06-18 17:44:06 -07:00
|
|
|
readonly: false
|
2017-01-10 17:07:28 +02:00
|
|
|
- else
|
|
|
|
|
= check_box_tag @user.id, @user.id, @user.confirmed?,
|
2019-03-30 21:57:45 +02:00
|
|
|
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
|
2017-01-10 17:07:28 +02:00
|
|
|
class: 'switch-checkbox',
|
2018-06-18 17:44:06 -07:00
|
|
|
readonly: true
|
2014-08-12 11:51:59 +03:00
|
|
|
= f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.'
|
2017-03-11 13:25:39 +05:30
|
|
|
= f.input :name, as: :string
|
2017-01-10 17:07:28 +02:00
|
|
|
= f.input :username, :as => :string if @user.new_record?
|
2014-06-23 19:07:50 +03:00
|
|
|
= f.input :email
|
2017-01-10 17:07:28 +02:00
|
|
|
= f.input :password if @user.new_record?
|
2017-03-11 13:25:39 +05:30
|
|
|
= f.input :affiliation, as: :string
|
2016-08-09 00:20:18 +02:00
|
|
|
= f.input :biography, input_html: { rows: 10, data: { provide: 'markdown-editable' } },
|
|
|
|
|
hint: markdown_hint
|
2014-08-12 15:59:22 +03:00
|
|
|
= f.actions do
|
2017-03-11 13:25:39 +05:30
|
|
|
= f.action :submit, button_html: {class: 'btn btn-primary'}
|