2014-02-12 05:23:40 -05:00
|
|
|
extends ../layout
|
|
|
|
|
|
|
|
block content
|
2014-06-09 05:56:26 -04:00
|
|
|
.content.content-alt
|
|
|
|
.container
|
|
|
|
.row
|
2018-06-15 06:30:34 -04:00
|
|
|
.col-md-12.col-lg-10.col-lg-offset-1
|
2019-06-18 11:35:57 -04:00
|
|
|
if ssoError
|
|
|
|
.alert.alert-danger
|
|
|
|
| #{translate('sso_link_error')}: #{translate(ssoError)}
|
2014-06-20 10:48:00 -04:00
|
|
|
.card
|
2014-06-09 05:56:26 -04:00
|
|
|
.page-header
|
2014-07-31 06:54:19 -04:00
|
|
|
h1 #{translate("account_settings")}
|
2014-06-20 10:48:00 -04:00
|
|
|
.account-settings(ng-controller="AccountSettingsController", ng-cloak)
|
2019-04-23 10:19:52 -04:00
|
|
|
|
2018-08-13 08:59:39 -04:00
|
|
|
if hasFeature('affiliations')
|
2018-06-27 12:08:25 -04:00
|
|
|
include settings/user-affiliations
|
2019-04-23 10:19:52 -04:00
|
|
|
|
2018-06-25 12:06:23 -04:00
|
|
|
.row
|
|
|
|
.col-md-5
|
|
|
|
h3 #{translate("update_account_info")}
|
|
|
|
form(async-form="settings", name="settingsForm", method="POST", action="/user/settings", novalidate)
|
|
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
2018-08-13 08:59:39 -04:00
|
|
|
if !hasFeature('affiliations')
|
2018-07-05 12:26:12 -04:00
|
|
|
if !externalAuthenticationSystemUsed()
|
|
|
|
.form-group
|
|
|
|
label(for='email') #{translate("email")}
|
|
|
|
input.form-control(
|
2019-07-11 11:22:45 -04:00
|
|
|
id="email"
|
2018-07-05 12:26:12 -04:00
|
|
|
type='email',
|
|
|
|
name='email',
|
|
|
|
placeholder="email@example.com"
|
|
|
|
required,
|
|
|
|
ng-model="email",
|
|
|
|
ng-init="email = "+JSON.stringify(user.email),
|
2020-02-27 07:46:47 -05:00
|
|
|
ng-model-options="{ updateOn: 'blur' }"
|
2018-07-05 12:26:12 -04:00
|
|
|
)
|
2019-07-11 11:22:45 -04:00
|
|
|
span.small.text-danger(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
|
2018-07-05 12:26:12 -04:00
|
|
|
| #{translate("must_be_email_address")}
|
|
|
|
else
|
|
|
|
// show the email, non-editable
|
|
|
|
.form-group
|
|
|
|
label.control-label #{translate("email")}
|
2019-03-18 06:24:54 -04:00
|
|
|
div.form-control(
|
|
|
|
readonly="true",
|
|
|
|
ng-non-bindable
|
|
|
|
) #{user.email}
|
2016-11-17 09:34:02 -05:00
|
|
|
|
2018-06-25 12:06:23 -04:00
|
|
|
if shouldAllowEditingDetails
|
|
|
|
.form-group
|
|
|
|
label(for='firstName').control-label #{translate("first_name")}
|
|
|
|
input.form-control(
|
2019-07-11 11:22:45 -04:00
|
|
|
id="firstName"
|
2018-06-25 12:06:23 -04:00
|
|
|
type='text',
|
|
|
|
name='first_name',
|
|
|
|
value=user.first_name
|
|
|
|
ng-non-bindable
|
|
|
|
)
|
|
|
|
.form-group
|
|
|
|
label(for='lastName').control-label #{translate("last_name")}
|
|
|
|
input.form-control(
|
2019-07-11 11:22:45 -04:00
|
|
|
id="lastName"
|
2018-06-25 12:06:23 -04:00
|
|
|
type='text',
|
|
|
|
name='last_name',
|
|
|
|
value=user.last_name
|
|
|
|
ng-non-bindable
|
|
|
|
)
|
2019-07-11 11:22:45 -04:00
|
|
|
.form-group
|
|
|
|
form-messages(aria-live="polite" for="settingsForm")
|
|
|
|
.alert.alert-success(ng-show="settingsForm.response.success")
|
|
|
|
| #{translate("thanks_settings_updated")}
|
2018-06-25 12:06:23 -04:00
|
|
|
.actions
|
|
|
|
button.btn.btn-primary(
|
|
|
|
type='submit',
|
|
|
|
ng-disabled="settingsForm.$invalid"
|
|
|
|
) #{translate("update")}
|
|
|
|
else
|
|
|
|
.form-group
|
|
|
|
label.control-label #{translate("first_name")}
|
2019-03-18 06:24:54 -04:00
|
|
|
div.form-control(
|
|
|
|
readonly="true",
|
|
|
|
ng-non-bindable
|
|
|
|
) #{user.first_name}
|
2018-06-25 12:06:23 -04:00
|
|
|
.form-group
|
|
|
|
label.control-label #{translate("last_name")}
|
2019-03-18 06:24:54 -04:00
|
|
|
div.form-control(
|
|
|
|
readonly="true",
|
|
|
|
ng-non-bindable
|
|
|
|
) #{user.last_name}
|
2016-11-25 09:38:00 -05:00
|
|
|
|
2018-09-10 13:53:33 -04:00
|
|
|
.col-md-5.col-md-offset-1
|
|
|
|
h3 #{translate("change_password")}
|
2018-09-18 08:10:33 -04:00
|
|
|
if externalAuthenticationSystemUsed() && !settings.overleaf
|
|
|
|
p
|
2018-09-19 06:58:04 -04:00
|
|
|
Password settings are managed externally
|
2019-04-25 10:21:47 -04:00
|
|
|
else if !hasPassword
|
|
|
|
p
|
|
|
|
| #[a(href="/user/password/reset", target='_blank') #{translate("no_existing_password")}]
|
2018-09-18 08:10:33 -04:00
|
|
|
else
|
|
|
|
- var submitAction
|
2019-06-14 12:31:46 -04:00
|
|
|
- submitAction = '/user/password/update'
|
2018-09-18 08:10:33 -04:00
|
|
|
form(
|
|
|
|
async-form="changepassword"
|
|
|
|
name="changePasswordForm"
|
|
|
|
action=submitAction
|
|
|
|
method="POST"
|
|
|
|
novalidate
|
|
|
|
)
|
|
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
|
|
.form-group
|
|
|
|
label(for='currentPassword') #{translate("current_password")}
|
|
|
|
input.form-control(
|
2019-07-11 11:22:45 -04:00
|
|
|
id="currentPassword"
|
2018-09-18 08:10:33 -04:00
|
|
|
type='password',
|
|
|
|
name='currentPassword',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="currentPassword",
|
|
|
|
required
|
|
|
|
)
|
2019-07-11 11:22:45 -04:00
|
|
|
span.small.text-danger(ng-show="changePasswordForm.currentPassword.$invalid && changePasswordForm.currentPassword.$dirty" aria-live="polite")
|
2018-09-18 08:10:33 -04:00
|
|
|
| #{translate("required")}
|
|
|
|
.form-group
|
2019-07-11 12:45:28 -04:00
|
|
|
label(for='passwordField') #{translate("new_password")}
|
2018-09-18 08:10:33 -04:00
|
|
|
input.form-control(
|
2019-07-11 12:45:28 -04:00
|
|
|
id='passwordField',
|
2018-09-18 08:10:33 -04:00
|
|
|
type='password',
|
|
|
|
name='newPassword1',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="newPassword1",
|
|
|
|
required,
|
|
|
|
complex-password
|
|
|
|
)
|
2019-07-11 11:22:45 -04:00
|
|
|
span.small.text-danger(ng-show="changePasswordForm.newPassword1.$error.complexPassword && changePasswordForm.newPassword1.$dirty", ng-bind-html="complexPasswordErrorMessage" aria-live="polite")
|
2018-09-18 08:10:33 -04:00
|
|
|
.form-group
|
|
|
|
label(for='newPassword2') #{translate("confirm_new_password")}
|
|
|
|
input.form-control(
|
2019-07-11 11:22:45 -04:00
|
|
|
id="newPassword2"
|
2018-09-18 08:10:33 -04:00
|
|
|
type='password',
|
|
|
|
name='newPassword2',
|
|
|
|
placeholder='*********',
|
|
|
|
ng-model="newPassword2",
|
|
|
|
equals="passwordField"
|
|
|
|
)
|
2019-07-11 11:22:45 -04:00
|
|
|
span.small.text-danger(ng-show="changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$dirty" aria-live="polite")
|
2018-09-18 08:10:33 -04:00
|
|
|
| #{translate("doesnt_match")}
|
2019-07-11 11:22:45 -04:00
|
|
|
span.small.text-danger(ng-show="!changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty" aria-live="polite")
|
2018-09-18 08:10:33 -04:00
|
|
|
| #{translate("invalid_password")}
|
2019-07-11 11:22:45 -04:00
|
|
|
.form-group
|
|
|
|
form-messages(aria-live="polite" for="changePasswordForm")
|
2018-09-18 08:10:33 -04:00
|
|
|
.actions
|
|
|
|
button.btn.btn-primary(
|
|
|
|
type='submit',
|
|
|
|
ng-disabled="changePasswordForm.$invalid"
|
|
|
|
) #{translate("change")}
|
2018-06-15 06:30:34 -04:00
|
|
|
|
2014-09-08 10:40:46 -04:00
|
|
|
| !{moduleIncludes("userSettings", locals)}
|
2019-03-22 08:21:00 -04:00
|
|
|
hr
|
2019-04-23 10:19:52 -04:00
|
|
|
|
2019-03-22 08:21:00 -04:00
|
|
|
h3
|
|
|
|
| #{translate("sharelatex_beta_program")}
|
|
|
|
|
|
|
|
if (user.betaProgram)
|
|
|
|
p.small
|
|
|
|
| #{translate("beta_program_already_participating")}
|
|
|
|
|
|
|
|
div
|
|
|
|
a(id="beta-program-participate-link" href="/beta/participate") #{translate("manage_beta_program_membership")}
|
2016-06-08 10:31:14 -04:00
|
|
|
|
2014-10-07 08:31:13 -04:00
|
|
|
hr
|
2016-10-07 05:52:58 -04:00
|
|
|
|
|
|
|
h3
|
|
|
|
| #{translate("sessions")}
|
|
|
|
|
|
|
|
div
|
|
|
|
a(id="sessions-link", href="/user/sessions") #{translate("manage_sessions")}
|
|
|
|
|
2019-09-30 09:21:31 -04:00
|
|
|
if hasFeature('oauth')
|
2019-04-23 10:19:52 -04:00
|
|
|
hr
|
|
|
|
include settings/user-oauth
|
2018-12-13 09:50:19 -05:00
|
|
|
|
2016-10-07 05:52:58 -04:00
|
|
|
hr
|
2014-02-12 05:23:40 -05:00
|
|
|
|
2018-08-31 08:57:27 -04:00
|
|
|
if !externalAuthenticationSystemUsed() || (settings.createV1AccountOnLogin && settings.overleaf)
|
2014-06-20 10:48:00 -04:00
|
|
|
|
2015-02-24 08:39:30 -05:00
|
|
|
p.small
|
|
|
|
| #{translate("newsletter_info_and_unsubscribe")}
|
|
|
|
a(
|
|
|
|
href,
|
|
|
|
ng-click="unsubscribe()",
|
|
|
|
ng-show="subscribed && !unsubscribing"
|
|
|
|
) #{translate("unsubscribe")}
|
|
|
|
span(
|
|
|
|
ng-show="unsubscribing"
|
|
|
|
)
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-spin.fa-refresh(aria-hidden="true")
|
2015-02-24 08:39:30 -05:00
|
|
|
| #{translate("unsubscribing")}
|
|
|
|
span.text-success(
|
|
|
|
ng-show="!subscribed"
|
|
|
|
)
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-check(aria-hidden="true")
|
2015-02-24 08:39:30 -05:00
|
|
|
| #{translate("unsubscribed")}
|
2018-08-16 09:11:43 -04:00
|
|
|
|
|
|
|
if !settings.overleaf && user.overleaf
|
|
|
|
p
|
|
|
|
| Please note: If you have linked your account with Overleaf
|
|
|
|
| v2, then deleting your ShareLaTeX account will also delete
|
|
|
|
| account and all of it's associated projects and data.
|
2015-02-24 08:39:30 -05:00
|
|
|
p #{translate("need_to_leave")}
|
|
|
|
a(href, ng-click="deleteAccount()") #{translate("delete_your_account")}
|
2014-06-20 10:48:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
script(type='text/ng-template', id='deleteAccountModalTemplate')
|
|
|
|
.modal-header
|
2014-07-31 06:54:19 -04:00
|
|
|
h3 #{translate("delete_account")}
|
2016-10-25 11:23:50 -04:00
|
|
|
div.modal-body#delete-account-modal
|
|
|
|
p !{translate("delete_account_warning_message_3")}
|
2018-09-04 06:19:57 -04:00
|
|
|
if settings.createV1AccountOnLogin && settings.overleaf
|
2019-07-11 11:23:03 -04:00
|
|
|
p
|
|
|
|
strong
|
|
|
|
| Your Overleaf v2 projects will be deleted if you delete your account.
|
|
|
|
| If you want to remove any remaining Overleaf v1 projects in your account,
|
|
|
|
| please first make sure they are imported to Overleaf v2.
|
2018-09-06 06:35:28 -04:00
|
|
|
|
2019-07-01 09:48:34 -04:00
|
|
|
if settings.overleaf && !hasPassword
|
|
|
|
p
|
|
|
|
b
|
|
|
|
| #[a(href="/user/password/reset", target='_blank') #{translate("delete_acct_no_existing_pw")}].
|
|
|
|
else
|
|
|
|
form(novalidate, name="deleteAccountForm")
|
|
|
|
label #{translate('email')}
|
|
|
|
input.form-control(
|
|
|
|
type="text",
|
|
|
|
autocomplete="off",
|
|
|
|
placeholder="",
|
|
|
|
ng-model="state.deleteText",
|
|
|
|
focus-on="open",
|
|
|
|
ng-keyup="checkValidation()"
|
|
|
|
)
|
2018-09-06 06:35:28 -04:00
|
|
|
|
2019-07-01 09:48:34 -04:00
|
|
|
label #{translate('password')}
|
|
|
|
input.form-control(
|
|
|
|
type="password",
|
|
|
|
autocomplete="off",
|
|
|
|
placeholder="",
|
|
|
|
ng-model="state.password",
|
|
|
|
ng-keyup="checkValidation()"
|
|
|
|
)
|
2018-09-06 06:35:28 -04:00
|
|
|
|
2019-07-01 09:48:34 -04:00
|
|
|
div.confirmation-checkbox-wrapper
|
|
|
|
input(
|
|
|
|
type="checkbox"
|
|
|
|
ng-model="state.confirmSharelatexDelete"
|
|
|
|
ng-change="checkValidation()"
|
|
|
|
).pull-left
|
2020-05-21 14:30:49 -04:00
|
|
|
label(style="display: inline") I understand this will delete all projects in my Overleaf account with email address #[em {{ userDefaultEmail }}]
|
2018-09-06 06:35:28 -04:00
|
|
|
|
2016-10-25 09:33:47 -04:00
|
|
|
div(ng-if="state.error")
|
2019-05-28 11:07:52 -04:00
|
|
|
div.alert.alert-danger(ng-switch="state.error.code")
|
|
|
|
span(ng-switch-when="InvalidCredentialsError")
|
|
|
|
| #{translate('email_or_password_wrong_try_again')}
|
|
|
|
span(ng-switch-when="SubscriptionAdminDeletionError")
|
|
|
|
| #{translate('subscription_admins_cannot_be_deleted')}
|
2019-08-28 08:59:41 -04:00
|
|
|
span(ng-switch-when="UserDeletionError")
|
|
|
|
| #{translate('user_deletion_error')}
|
2019-05-28 11:07:52 -04:00
|
|
|
span(ng-switch-default)
|
|
|
|
| #{translate('generic_something_went_wrong')}
|
2018-09-04 06:19:57 -04:00
|
|
|
if settings.createV1AccountOnLogin && settings.overleaf
|
2019-05-28 11:07:52 -04:00
|
|
|
div(ng-if="state.error && state.error.code == 'InvalidCredentialsError'")
|
2018-09-04 06:19:57 -04:00
|
|
|
div.alert.alert-info
|
|
|
|
| If you can't remember your password, or if you are using Single-Sign-On with another provider
|
|
|
|
| to sign in (such as Twitter or Google), please
|
2018-12-14 10:45:18 -05:00
|
|
|
| #[a(href="/user/password/reset", target='_blank') reset your password],
|
2018-09-04 06:19:57 -04:00
|
|
|
| and try again.
|
2014-06-20 10:48:00 -04:00
|
|
|
.modal-footer
|
|
|
|
button.btn.btn-default(
|
|
|
|
ng-click="cancel()"
|
2014-07-31 06:54:19 -04:00
|
|
|
) #{translate("cancel")}
|
2014-06-20 10:48:00 -04:00
|
|
|
button.btn.btn-danger(
|
2014-07-28 11:52:23 -04:00
|
|
|
ng-disabled="!state.isValid || state.inflight"
|
2014-06-20 10:48:00 -04:00
|
|
|
ng-click="delete()"
|
|
|
|
)
|
2014-07-31 06:54:19 -04:00
|
|
|
span(ng-hide="state.inflight") #{translate("delete")}
|
2020-04-22 05:35:33 -04:00
|
|
|
span(ng-show="state.inflight") #{translate("deleting")}…
|
2015-04-28 13:30:19 -04:00
|
|
|
|
|
|
|
script(type='text/javascript').
|
2020-04-22 05:35:33 -04:00
|
|
|
window.passwordStrengthOptions = !{StringHelper.stringifyJsonForScript(settings.passwordStrengthOptions || {})}
|