2015-05-13 15:02:19 -07:00
|
|
|
|
- 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
|
2014-12-13 07:03:18 -08:00
|
|
|
|
= 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|
|
2014-12-07 07:04:05 -08:00
|
|
|
|
/ 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"} ×
|
2015-06-07 06:10:17 -07:00
|
|
|
|
%span.sr-only= t 'views.actions.close'
|
|
|
|
|
%h4#modal-passwd-label.modal-title= t 'views.settings.account.modal.title'
|
2014-12-07 07:04:05 -08:00
|
|
|
|
.modal-body
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= f.password_field :current_password, autocomplete: "off", label: t('views.settings.account.password_current'), help: t('views.settings.account.password_current_help')
|
2014-12-07 07:04:05 -08:00
|
|
|
|
.modal-footer
|
2015-06-07 06:10:17 -07:00
|
|
|
|
%button.btn.btn-default{"data-dismiss" => "modal", :type => "button"}= t 'views.actions.cancel'
|
|
|
|
|
%button.btn.btn-primary{:type => "submit"}= t 'views.actions.save'
|
2014-12-07 07:04:05 -08:00
|
|
|
|
|
2014-11-11 11:01:24 -08:00
|
|
|
|
= devise_error_messages!
|
2014-11-02 11:52:19 -08:00
|
|
|
|
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
|
2014-11-02 11:52:19 -08:00
|
|
|
|
|
2015-06-07 06:10:17 -07: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?
|
2015-06-07 06:10:17 -07:00
|
|
|
|
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
|
2014-11-02 11:52:19 -08:00
|
|
|
|
|
2015-06-07 06:10:17 -07: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
|
|
|
|
|
2014-12-07 07:04:05 -08:00
|
|
|
|
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= t 'views.actions.save'
|
2014-11-02 11:52:19 -08:00
|
|
|
|
|
2014-11-11 11:01:24 -08:00
|
|
|
|
%hr/
|
|
|
|
|
%p
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= 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
|
|
|
|
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= link_to t('views.settings.account.back'), :back
|
2014-11-17 04:19:59 -08:00
|
|
|
|
|
2015-05-10 10:48:47 -07:00
|
|
|
|
.visible-xs= render "shared/links"
|