mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
bfb369fab0
Conflicts repaired: app/views/user/settings.pug modified: app/coffee/Features/Authentication/AuthenticationController.coffee modified: app/coffee/Features/Editor/EditorHttpController.coffee modified: app/coffee/Features/Email/EmailBuilder.coffee modified: app/coffee/Features/Errors/Errors.coffee modified: app/coffee/Features/Exports/ExportsController.coffee modified: app/coffee/Features/Exports/ExportsHandler.coffee modified: app/coffee/Features/Notifications/NotificationsBuilder.coffee modified: app/coffee/Features/Notifications/NotificationsHandler.coffee modified: app/coffee/Features/Project/ProjectController.coffee modified: app/coffee/Features/StaticPages/HomeController.coffee modified: app/coffee/Features/Subscription/planFeatures.coffee modified: app/coffee/Features/TokenAccess/TokenAccessController.coffee modified: app/coffee/Features/TokenAccess/TokenAccessHandler.coffee modified: app/coffee/Features/User/UserGetter.coffee modified: app/coffee/infrastructure/RedirectManager.coffee modified: app/coffee/infrastructure/Server.coffee modified: app/coffee/models/User.coffee modified: app/coffee/router.coffee modified: app/views/_mixins/links.pug modified: app/views/general/500.pug modified: app/views/layout/navbar.pug modified: app/views/project/editor/header.pug modified: app/views/project/editor/share.pug modified: app/views/project/list.pug modified: app/views/project/list/modals.pug modified: app/views/project/list/notifications.pug modified: app/views/project/list/side-bar.pug modified: app/views/project/list/v1-item.pug modified: app/views/subscriptions/_modal_group_inquiry.pug modified: app/views/subscriptions/dashboard.pug modified: app/views/user/settings.pug modified: config/settings.defaults.coffee modified: npm-shrinkwrap.json modified: package.json new file: public/apple-touch-icon.png new file: public/atlassian-domain-verification.html modified: public/coffee/ide/editor/directives/aceEditor.coffee modified: public/coffee/ide/editor/directives/aceEditor/cursor-position/CursorPositionManager.coffee modified: public/coffee/ide/share/controllers/ShareController.coffee modified: public/coffee/main.coffee deleted: public/coffee/main/account-merge-checker.coffee modified: public/coffee/main/contact-us.coffee modified: public/coffee/main/project-list/left-hand-menu-promo-controller.coffee new file: public/google4f15e48c48709a75.html new file: public/googleef256f97939bd9b7.html new file: public/img/advocates/friend.jpeg new file: public/img/grid.png new file: public/img/homepage.png new file: public/img/homepage@2x.png new file: public/img/other-brands/logo_google.svg new file: public/img/other-brands/logo_google_alt.svg new file: public/img/other-brands/logo_ieee.svg new file: public/img/other-brands/logo_orcid.svg new file: public/img/other-brands/logo_orcid_alt.svg new file: public/img/other-brands/logo_sharelatex.svg new file: public/img/other-brands/logo_twitter.svg new file: public/img/overleaf-partner/overleaf-greygreen-410.png new file: public/img/overleaf-partner/overleaf-white-410.png new file: public/static/brochures/Overleaf-Information-v8.pdf new file: public/static/brochures/Overleaf-Institutional-Solutions-v1.pdf new file: public/static/brochures/Overleaf-Tri-Fold-leaflet.pdf new file: public/static/brochures/Overleaf-request-for-service.pdf new file: public/static/brochures/Overleaf_Institutional.pdf new file: public/static/campus-challenge/campus-challenge-2016-flyer.pdf new file: public/static/campus-challenge/campus-challenge-2016-poster.pdf new file: public/static/campus-challenge/campus-challenge-2017-flyer.pdf new file: public/static/campus-challenge/campus-challenge-2017-poster.pdf new file: public/static/latex/learn/free-online-introduction-to-latex-part-1.pdf new file: public/static/latex/learn/free-online-introduction-to-latex-part-2.pdf new file: public/static/latex/learn/free-online-introduction-to-latex-part-3.pdf new file: public/static/partners/caltech-library.gif new file: public/static/partners/stanford-building.jpg modified: public/stylesheets/_ol_style_includes.less modified: public/stylesheets/app/blog-posts.less modified: public/stylesheets/app/cms-page.less new file: public/stylesheets/app/content_page.less modified: public/stylesheets/app/editor/share.less modified: public/stylesheets/app/editor/toolbar.less modified: public/stylesheets/app/features.less modified: public/stylesheets/app/homepage.less new file: public/stylesheets/app/login-register.less modified: public/stylesheets/app/plans.less modified: public/stylesheets/app/portals.less modified: public/stylesheets/app/templates-v2.less modified: public/stylesheets/app/wiki.less modified: public/stylesheets/components/alerts.less modified: public/stylesheets/components/buttons.less modified: public/stylesheets/components/icons.less new file: public/stylesheets/components/images.less new file: public/stylesheets/components/tabs.less modified: public/stylesheets/core/_common-variables.less modified: public/stylesheets/core/ol-variables.less modified: public/stylesheets/ol-style.less modified: test/acceptance/coffee/ExportsTests.coffee new file: test/acceptance/coffee/RedirectUrlsTests.coffee modified: test/acceptance/coffee/TokenAccessTests.coffee modified: test/acceptance/coffee/helpers/User.coffee modified: test/acceptance/config/settings.test.coffee modified: test/unit/coffee/Authentication/AuthenticationControllerTests.coffee modified: test/unit/coffee/Editor/EditorHttpControllerTests.coffee modified: test/unit/coffee/Exports/ExportsControllerTests.coffee modified: test/unit/coffee/Exports/ExportsHandlerTests.coffee new file: test/unit/coffee/Notifications/NotificationsBuilderTests.coffee modified: test/unit/coffee/Project/ProjectControllerTests.coffee modified: test/unit/coffee/TokenAccess/TokenAccessControllerTests.coffee modified: test/unit/coffee/User/UserGetterTests.coffee deleted: test/unit/coffee/infrastructure/RedirectManagerTests.coffee
266 lines
9.7 KiB
Text
266 lines
9.7 KiB
Text
extends ../layout
|
||
|
||
block content
|
||
.content.content-alt
|
||
.container
|
||
.row
|
||
.col-md-12.col-lg-10.col-lg-offset-1
|
||
.card
|
||
.page-header
|
||
h1 #{translate("account_settings")}
|
||
.account-settings(ng-controller="AccountSettingsController", ng-cloak)
|
||
if hasFeature('affiliations')
|
||
include settings/user-affiliations
|
||
|
||
form-messages(for="settingsForm")
|
||
.alert.alert-success(ng-show="settingsForm.response.success")
|
||
| #{translate("thanks_settings_updated")}
|
||
form-messages(for="changePasswordForm")
|
||
|
||
.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)
|
||
if !hasFeature('affiliations')
|
||
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="{ pdateOn: 'blur' }"
|
||
)
|
||
span.small.text-primary(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
|
||
| #{translate("must_be_email_address")}
|
||
else
|
||
// show the email, non-editable
|
||
.form-group
|
||
label.control-label #{translate("email")}
|
||
div.form-control(readonly="true") #{user.email}
|
||
|
||
if shouldAllowEditingDetails
|
||
.form-group
|
||
label(for='firstName').control-label #{translate("first_name")}
|
||
input.form-control(
|
||
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(
|
||
type='text',
|
||
name='last_name',
|
||
value=user.last_name
|
||
ng-non-bindable
|
||
)
|
||
.actions
|
||
button.btn.btn-primary(
|
||
type='submit',
|
||
ng-disabled="settingsForm.$invalid"
|
||
) #{translate("update")}
|
||
else
|
||
.form-group
|
||
label.control-label #{translate("first_name")}
|
||
div.form-control(readonly="true") #{user.first_name}
|
||
.form-group
|
||
label.control-label #{translate("last_name")}
|
||
div.form-control(readonly="true") #{user.last_name}
|
||
|
||
.col-md-5.col-md-offset-1
|
||
h3 #{translate("change_password")}
|
||
if externalAuthenticationSystemUsed() && !settings.overleaf
|
||
p
|
||
Password settings are managed externally
|
||
else
|
||
- var submitAction
|
||
if settings.overleaf
|
||
- submitAction = '/user/change_password/v1'
|
||
else
|
||
- submitAction = '/user/password/update'
|
||
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(
|
||
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='passwordField',
|
||
type='password',
|
||
name='newPassword1',
|
||
placeholder='*********',
|
||
ng-model="newPassword1",
|
||
required,
|
||
complex-password
|
||
)
|
||
span.small.text-primary(ng-show="changePasswordForm.newPassword1.$error.complexPassword && changePasswordForm.newPassword1.$dirty", ng-bind-html="complexPasswordErrorMessage")
|
||
.form-group
|
||
label(for='newPassword2') #{translate("confirm_new_password")}
|
||
input.form-control(
|
||
type='password',
|
||
name='newPassword2',
|
||
placeholder='*********',
|
||
ng-model="newPassword2",
|
||
equals="passwordField"
|
||
)
|
||
span.small.text-primary(ng-show="changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$dirty")
|
||
| #{translate("doesnt_match")}
|
||
span.small.text-primary(ng-show="!changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty")
|
||
| #{translate("invalid_password")}
|
||
.actions
|
||
button.btn.btn-primary(
|
||
type='submit',
|
||
ng-disabled="changePasswordForm.$invalid"
|
||
) #{translate("change")}
|
||
|
||
| !{moduleIncludes("userSettings", locals)}
|
||
|
||
//- The beta program doesn't make much sense to include while v2 is going
|
||
//- but we may want to add it back in later
|
||
//- hr
|
||
//-
|
||
//- 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")}
|
||
|
||
hr
|
||
|
||
h3
|
||
| #{translate("sessions")}
|
||
|
||
div
|
||
a(id="sessions-link", href="/user/sessions") #{translate("manage_sessions")}
|
||
|
||
hr
|
||
|
||
if !externalAuthenticationSystemUsed() || (settings.createV1AccountOnLogin && settings.overleaf)
|
||
|
||
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")}
|
||
|
||
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.
|
||
p #{translate("need_to_leave")}
|
||
a(href, ng-click="deleteAccount()") #{translate("delete_your_account")}
|
||
|
||
|
||
script(type='text/ng-template', id='deleteAccountModalTemplate')
|
||
.modal-header
|
||
h3 #{translate("delete_account")}
|
||
div.modal-body#delete-account-modal
|
||
p !{translate("delete_account_warning_message_3")}
|
||
if settings.createV1AccountOnLogin && settings.overleaf
|
||
p
|
||
strong
|
||
| This will also delete your user account on #[a(href='/sign_in_to_v1?return_to=/dash%3Fprefer-v1-dash%3D1' target="_blank") Overleaf v1].
|
||
| If you want to remove your projects from Overleaf v1, you must do this before you
|
||
| delete your account by going to your My Projects page in Overleaf v1, moving your
|
||
| projects to the Trash, and then from there either ‘leaving’ or ‘purging’ them, as appropriate.
|
||
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()"
|
||
)
|
||
|
||
label #{translate('password')}
|
||
input.form-control(
|
||
type="password",
|
||
autocomplete="off",
|
||
placeholder="",
|
||
ng-model="state.password",
|
||
ng-keyup="checkValidation()"
|
||
)
|
||
|
||
div.confirmation-checkbox-wrapper
|
||
input(
|
||
type="checkbox"
|
||
ng-model="state.confirmV1Purge"
|
||
ng-change="checkValidation()"
|
||
).pull-left
|
||
label(style="display: inline") I have left or purged my projects on Overleaf v1 (if any)
|
||
|
||
div.confirmation-checkbox-wrapper
|
||
input(
|
||
type="checkbox"
|
||
ng-model="state.confirmSharelatexDelete"
|
||
ng-change="checkValidation()"
|
||
).pull-left
|
||
label(style="display: inline") I understand this will delete all projects in my Overleaf v2 account (and ShareLaTeX account, if any) with email address #[em {{ userDefaultEmail }}]
|
||
|
||
div(ng-if="state.error")
|
||
div.alert.alert-danger
|
||
| #{translate('generic_something_went_wrong')}
|
||
div(ng-if="state.invalidCredentials")
|
||
div.alert.alert-danger
|
||
| #{translate('email_or_password_wrong_try_again')}
|
||
if settings.createV1AccountOnLogin && settings.overleaf
|
||
div(ng-if="state.error || state.invalidCredentials")
|
||
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
|
||
| #[a(href='/sign_in_to_v1?return_to=/users/password/new', target='_blank') reset your password],
|
||
| and try again.
|
||
.modal-footer
|
||
button.btn.btn-default(
|
||
ng-click="cancel()"
|
||
) #{translate("cancel")}
|
||
button.btn.btn-danger(
|
||
ng-disabled="!state.isValid || state.inflight"
|
||
ng-click="delete()"
|
||
)
|
||
span(ng-hide="state.inflight") #{translate("delete")}
|
||
span(ng-show="state.inflight") #{translate("deleting")}...
|
||
|
||
script(type='text/javascript').
|
||
window.passwordStrengthOptions = !{JSON.stringify(settings.passwordStrengthOptions || {})}
|
||
|