Retrospring/app/views/user/_account.html.haml

47 lines
2.5 KiB
Plaintext
Raw Normal View History

- provide(:title, generate_title("Account Settings"))
2014-11-02 11:52:19 -08:00
.container.j2-page
2020-04-19 14:09:41 -07:00
.row
= render 'user/settings_tabs'
.col-md-9.col-xs-12.col-sm-8
= render 'layouts/messages'
.card.card-default
.card-body
= bootstrap_form_for(resource, as: resource_name, url: '/settings/account', html: { method: :put }) do |f|
/ Password field modal
#modal-passwd.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "modal-passwd-label", :role => "dialog", :tabindex => "-1"}
.modal-dialog
.modal-content
.modal-header
%button.close{"data-dismiss" => "modal", :type => "button"}
%span{"aria-hidden" => "true"} ×
%span.sr-only= t 'views.actions.close'
%h4#modal-passwd-label.modal-title= t 'views.settings.account.modal.title'
.modal-body
= f.password_field :current_password, autocomplete: "off", label: t('views.settings.account.password_current'), help: t('views.settings.account.password_current_help')
.modal-footer
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"}= t 'views.actions.cancel'
%button.btn.btn-primary{:type => "submit"}= t 'views.actions.save'
= 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
2015-05-10 10:48:47 -07:00
.visible-xs= render "shared/links"