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

46 lines
2.4 KiB
Plaintext
Raw Normal View History

- provide(:title, generate_title("Account Settings"))
2014-11-02 11:52:19 -08:00
.container.j2-page
= render 'user/settings_tabs'
.col-md-9.col-xs-12.col-sm-9
= render 'layouts/messages'
2014-11-11 11:01:24 -08:00
.panel.panel-default
.panel-body
2014-12-07 06:53:19 -08:00
= 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'
2014-11-11 11:01:24 -08:00
= devise_error_messages!
2014-11-02 11:52:19 -08:00
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
2014-11-02 11:52:19 -08:00
= f.email_field :email, label: t('views.settings.account.email')
2014-11-11 11:01:24 -08:00
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
2014-11-02 11:52:19 -08:00
= 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')
2014-11-02 11:52:19 -08:00
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
= t 'views.actions.save'
2014-11-02 11:52:19 -08:00
2014-11-11 11:01:24 -08:00
%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"
2014-11-02 11:52:19 -08:00
= link_to t('views.settings.account.back'), :back
2015-05-10 10:48:47 -07:00
.visible-xs= render "shared/links"