Retrospring/app/views/settings/_account.haml

30 lines
1.2 KiB
Plaintext

.card
.card-body
= bootstrap_form_for(resource, as: resource_name, url: '/settings/account', html: { method: :put }) do |f|
= render 'modal/password', f: f
= devise_error_messages!
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
= f.email_field :email, label: t('views.settings.account.email')
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password'), help: t('views.settings.account.password_help')
= f.password_field :password_confirmation, autocomplete: "off", label: t('views.settings.account.password_confirm')
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
= t 'views.actions.save'
%hr/
%p
= t 'views.settings.account.unsatisfied'
=button_to t('views.settings.account.delete'), '/settings/account', data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-xs"
= link_to t('views.settings.account.back'), :back
.visible-xs= render "shared/links"