2014-02-12 10:23:40 +00:00
|
|
|
extends ../layout
|
|
|
|
|
|
|
|
block content
|
2014-06-09 09:56:26 +00:00
|
|
|
.content.content-alt
|
|
|
|
.container
|
|
|
|
.row
|
|
|
|
.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
|
2014-06-20 14:48:00 +00:00
|
|
|
.card
|
2014-06-09 09:56:26 +00:00
|
|
|
.page-header
|
2014-07-31 10:54:19 +00:00
|
|
|
h1 #{translate("account_settings")}
|
2014-06-20 14:48:00 +00:00
|
|
|
.account-settings(ng-controller="AccountSettingsController", ng-cloak)
|
|
|
|
form-messages(for="settingsForm")
|
|
|
|
.alert.alert-success(ng-show="settingsForm.response.success")
|
2014-07-31 10:54:19 +00:00
|
|
|
| #{translate("thanks_settings_updated")}
|
2014-06-20 14:48:00 +00:00
|
|
|
form-messages(for="changePasswordForm")
|
|
|
|
.container-fluid
|
|
|
|
.row
|
|
|
|
.col-md-5
|
2014-07-31 10:54:19 +00:00
|
|
|
h3 #{translate("update_account_info")}
|
2014-11-17 15:19:11 +00:00
|
|
|
form(async-form="settings", name="settingsForm", method="POST", action="/user/settings", novalidate)
|
2014-06-20 14:48:00 +00:00
|
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
2015-02-24 13:39:30 +00:00
|
|
|
if !externalAuthenticationSystemUsed()
|
|
|
|
.form-group
|
|
|
|
label(for='email') #{translate("email")}
|
|
|
|
input.form-control(
|
|
|
|
type='email',
|
|
|
|
name='email',
|
|
|
|
placeholder="email@example.com"
|
|
|
|
required,
|
|
|
|
ng-model="email",
|
|
|
|
ng-init="email = #{JSON.stringify(user.email)}",
|
|
|
|
ng-model-options="{ updateOn: 'blur' }"
|
|
|
|
)
|
|
|
|
span.small.text-primary(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
|
|
|
|
| #{translate("must_be_email_address")}
|
2014-06-20 14:48:00 +00:00
|
|
|
.form-group
|
2014-07-31 10:54:19 +00:00
|
|
|
label(for='firstName').control-label #{translate("first_name")}
|
2014-06-20 14:48:00 +00:00
|
|
|
input.form-control(
|
|
|
|
type='text',
|
|
|
|
name='first_name',
|
|
|
|
value=user.first_name
|
|
|
|
)
|
|
|
|
.form-group
|
2014-07-31 10:54:19 +00:00
|
|
|
label(for='lastName').control-label #{translate("last_name")}
|
2014-06-20 14:48:00 +00:00
|
|
|
input.form-control(
|
|
|
|
type='text',
|
|
|
|
name='last_name',
|
|
|
|
value=user.last_name
|
|
|
|
)
|
|
|
|
.actions
|
|
|
|
button.btn.btn-primary(
|
|
|
|
type='submit',
|
|
|
|
ng-disabled="settingsForm.$invalid"
|
2014-07-31 10:54:19 +00:00
|
|
|
) #{translate("update")}
|
2015-02-24 13:39:30 +00:00
|
|
|
if !externalAuthenticationSystemUsed()
|
|
|
|
.col-md-5.col-md-offset-1
|
|
|
|
h3 #{translate("change_password")}
|
|
|
|
form(async-form="changepassword", name="changePasswordForm", action="/user/password/update", method="POST", novalidate)
|
|
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
|
|
.form-group
|
|
|
|
label(for='currentPassword') #{translate("current_password")}
|
|
|
|
input.form-control(
|
|
|
|
type='password',
|
|
|
|
name='currentPassword',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="currentPassword",
|
|
|
|
required
|
|
|
|
)
|
|
|
|
span.small.text-primary(ng-show="changePasswordForm.currentPassword.$invalid && changePasswordForm.currentPassword.$dirty")
|
|
|
|
| #{translate("required")}
|
|
|
|
.form-group
|
|
|
|
label(for='newPassword1') #{translate("new_password")}
|
|
|
|
input.form-control(
|
|
|
|
id='newPassword1',
|
|
|
|
type='password',
|
|
|
|
name='newPassword1',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="newPassword1",
|
|
|
|
required
|
|
|
|
)
|
|
|
|
span.small.text-primary(ng-show="changePasswordForm.newPassword1.$invalid && changePasswordForm.newPassword1.$dirty")
|
|
|
|
| #{translate("required")}
|
|
|
|
.form-group
|
|
|
|
label(for='newPassword2') #{translate("confirm_new_password")}
|
|
|
|
input.form-control(
|
|
|
|
type='password',
|
|
|
|
name='newPassword2',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="newPassword2",
|
|
|
|
equals="newPassword1"
|
|
|
|
)
|
|
|
|
span.small.text-primary(ng-show="changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty")
|
|
|
|
| #{translate("doesnt_match")}
|
|
|
|
.actions
|
|
|
|
button.btn.btn-primary(
|
|
|
|
type='submit',
|
|
|
|
ng-disabled="changePasswordForm.$invalid"
|
|
|
|
) #{translate("change")}
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2014-09-08 14:40:46 +00:00
|
|
|
| !{moduleIncludes("userSettings", locals)}
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2014-10-07 12:31:13 +00:00
|
|
|
hr
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2015-02-24 13:39:30 +00:00
|
|
|
if !externalAuthenticationSystemUsed()
|
2014-06-20 14:48:00 +00:00
|
|
|
|
2015-02-24 13:39:30 +00:00
|
|
|
p.small
|
|
|
|
| #{translate("newsletter_info_and_unsubscribe")}
|
|
|
|
a(
|
|
|
|
href,
|
|
|
|
ng-click="unsubscribe()",
|
|
|
|
ng-show="subscribed && !unsubscribing"
|
|
|
|
) #{translate("unsubscribe")}
|
|
|
|
span(
|
|
|
|
ng-show="unsubscribing"
|
|
|
|
)
|
|
|
|
i.fa.fa-spin.fa-refresh
|
|
|
|
| #{translate("unsubscribing")}
|
|
|
|
span.text-success(
|
|
|
|
ng-show="!subscribed"
|
|
|
|
)
|
|
|
|
i.fa.fa-check
|
|
|
|
| #{translate("unsubscribed")}
|
|
|
|
|
|
|
|
p #{translate("need_to_leave")}
|
|
|
|
a(href, ng-click="deleteAccount()") #{translate("delete_your_account")}
|
2014-06-20 14:48:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
script(type='text/ng-template', id='deleteAccountModalTemplate')
|
|
|
|
.modal-header
|
2014-07-31 10:54:19 +00:00
|
|
|
h3 #{translate("delete_account")}
|
2014-06-20 14:48:00 +00:00
|
|
|
.modal-body
|
2014-07-31 10:54:19 +00:00
|
|
|
p !{translate("delete_account_warning_message")}
|
2014-06-20 14:48:00 +00:00
|
|
|
form(novalidate, name="deleteAccountForm")
|
|
|
|
input.form-control(
|
|
|
|
type="text",
|
|
|
|
placeholder="",
|
2014-07-28 15:52:23 +00:00
|
|
|
ng-model="state.deleteText",
|
|
|
|
focus-on="open",
|
|
|
|
ng-keyup="checkValidation()"
|
2014-06-20 14:48:00 +00:00
|
|
|
)
|
|
|
|
.modal-footer
|
|
|
|
button.btn.btn-default(
|
|
|
|
ng-click="cancel()"
|
2014-07-31 10:54:19 +00:00
|
|
|
) #{translate("cancel")}
|
2014-06-20 14:48:00 +00:00
|
|
|
button.btn.btn-danger(
|
2014-07-28 15:52:23 +00:00
|
|
|
ng-disabled="!state.isValid || state.inflight"
|
2014-06-20 14:48:00 +00:00
|
|
|
ng-click="delete()"
|
|
|
|
)
|
2014-07-31 10:54:19 +00:00
|
|
|
span(ng-hide="state.inflight") #{translate("delete")}
|
|
|
|
span(ng-show="state.inflight") #{translate("deleting")}...
|
2014-02-22 11:26:36 +00:00
|
|
|
|