mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
data-provide="markdown-editable" is intended for inline editing of page content à la contenteditable. When this is applied to a textarea, the editor is loaded only after the user clicks on the field. This behavior breaks focus and is incompatible with keyboard navigation.
26 lines
1.1 KiB
Text
26 lines
1.1 KiB
Text
= semantic_form_for [:admin, @user] do |f|
|
|
= f.inputs 'Basic Information' do
|
|
- unless @user.new_record?
|
|
.pull-right
|
|
%b
|
|
Confirmed?
|
|
- if can? :toggle_confirmation, @user
|
|
= check_box_tag @user.id, @user.id, @user.confirmed?,
|
|
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
|
|
class: 'switch-checkbox',
|
|
readonly: false
|
|
- else
|
|
= check_box_tag @user.id, @user.id, @user.confirmed?,
|
|
url: "#{toggle_confirmation_admin_user_path(@user.id)}?user[to_confirm]=",
|
|
class: 'switch-checkbox',
|
|
readonly: true
|
|
= f.input :is_admin, hint: 'An admin can create a new conference, manage users and make other users admins.'
|
|
= f.input :name, as: :string
|
|
= f.input :username, :as => :string if @user.new_record?
|
|
= f.input :email
|
|
= f.input :password if @user.new_record?
|
|
= f.input :affiliation, as: :string
|
|
= f.input :biography, input_html: { rows: 10, data: { provide: 'markdown' } },
|
|
hint: markdown_hint
|
|
= f.actions do
|
|
= f.action :submit, button_html: {class: 'btn btn-primary'}
|