Diff and patch modification (close #34)
This commit is contained in:
211
ldap-overleaf-sl/sharelatex_diff/settings.pug.diff
Normal file
211
ldap-overleaf-sl/sharelatex_diff/settings.pug.diff
Normal file
@@ -0,0 +1,211 @@
|
||||
1c1
|
||||
< extends ../layout-marketing
|
||||
---
|
||||
> extends ../layout
|
||||
3,4c3,14
|
||||
< block entrypointVar
|
||||
< - entrypoint = 'pages/user/settings'
|
||||
---
|
||||
> block content
|
||||
> .content.content-alt
|
||||
> .container
|
||||
> .row
|
||||
> .col-md-12.col-lg-10.col-lg-offset-1
|
||||
> if ssoError
|
||||
> .alert.alert-danger
|
||||
> | #{translate('sso_link_error')}: #{translate(ssoError)}
|
||||
> .card
|
||||
> .page-header
|
||||
> h1 #{translate("account_settings")}
|
||||
> .account-settings(ng-controller="AccountSettingsController", ng-cloak)
|
||||
6,28c16,17
|
||||
< block append meta
|
||||
< meta(name="ol-hasPassword" data-type="boolean" content=hasPassword)
|
||||
< meta(name="ol-shouldAllowEditingDetails" data-type="boolean" content=shouldAllowEditingDetails)
|
||||
< meta(name="ol-oauthProviders", data-type="json", content=oauthProviders)
|
||||
< meta(name="ol-institutionLinked", data-type="json", content=institutionLinked)
|
||||
< meta(name="ol-samlError", data-type="json", content=samlError)
|
||||
< meta(name="ol-institutionEmailNonCanonical", content=institutionEmailNonCanonical)
|
||||
<
|
||||
< meta(name="ol-reconfirmedViaSAML", content=reconfirmedViaSAML)
|
||||
< meta(name="ol-reconfirmationRemoveEmail", content=reconfirmationRemoveEmail)
|
||||
< meta(name="ol-samlBeta", content=samlBeta)
|
||||
< meta(name="ol-ssoErrorMessage", content=ssoErrorMessage)
|
||||
< meta(name="ol-thirdPartyIds", data-type="json", content=thirdPartyIds || {})
|
||||
< meta(name="ol-passwordStrengthOptions", data-type="json", content=settings.passwordStrengthOptions || {})
|
||||
< meta(name="ol-isExternalAuthenticationSystemUsed" data-type="boolean" content=externalAuthenticationSystemUsed())
|
||||
< meta(name="ol-user" data-type="json" content=user)
|
||||
< meta(name="ol-dropbox" data-type="json" content=dropbox)
|
||||
< meta(name="ol-github" data-type="json" content=github)
|
||||
< meta(name="ol-projectSyncSuccessMessage", content=projectSyncSuccessMessage)
|
||||
< meta(name="ol-showPersonalAccessToken", data-type="boolean" content=showPersonalAccessToken)
|
||||
< meta(name="ol-personalAccessTokens", data-type="json" content=personalAccessTokens)
|
||||
< meta(name="ol-emailAddressLimit", data-type="json", content=emailAddressLimit)
|
||||
< meta(name="ol-currentManagedUserAdminEmail" data-type="string" content=currentManagedUserAdminEmail)
|
||||
---
|
||||
> if hasFeature('affiliations')
|
||||
> include settings/user-affiliations
|
||||
30,31c19,178
|
||||
< block content
|
||||
< main.content.content-alt#settings-page-root
|
||||
---
|
||||
> .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')
|
||||
> // show the email, non-editable
|
||||
> .form-group
|
||||
> label.control-label #{translate("email")}
|
||||
> div.form-control(
|
||||
> readonly="true",
|
||||
> ng-non-bindable
|
||||
> ) #{user.email}
|
||||
>
|
||||
> if shouldAllowEditingDetails
|
||||
> .form-group
|
||||
> label(for='firstName').control-label #{translate("first_name")}
|
||||
> input.form-control(
|
||||
> id="firstName"
|
||||
> 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(
|
||||
> id="lastName"
|
||||
> type='text',
|
||||
> name='last_name',
|
||||
> value=user.last_name
|
||||
> ng-non-bindable
|
||||
> )
|
||||
> .form-group
|
||||
> form-messages(aria-live="polite" for="settingsForm")
|
||||
> .alert.alert-success(ng-show="settingsForm.response.success")
|
||||
> | #{translate("thanks_settings_updated")}
|
||||
> .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",
|
||||
> ng-non-bindable
|
||||
> ) #{user.first_name}
|
||||
> .form-group
|
||||
> label.control-label #{translate("last_name")}
|
||||
> div.form-control(
|
||||
> readonly="true",
|
||||
> ng-non-bindable
|
||||
> ) #{user.last_name}
|
||||
>
|
||||
> .col-md-5.col-md-offset-1
|
||||
> h3
|
||||
> | Set Password for Email login
|
||||
> p
|
||||
> | Note: you can not change the LDAP password from here. You can set/reset a password for
|
||||
> | your email login:
|
||||
> | #[a(href="/user/password/reset", target='_blank') Reset.]
|
||||
>
|
||||
> | !{moduleIncludes("userSettings", locals)}
|
||||
> hr
|
||||
>
|
||||
> h3
|
||||
> | Contact
|
||||
> div
|
||||
> | If you need any help, please contact your sysadmins.
|
||||
>
|
||||
> 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
|
||||
> | 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.
|
||||
>
|
||||
> 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()"
|
||||
> )
|
||||
>
|
||||
> 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, purged or imported 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(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')}
|
||||
> span(ng-switch-when="UserDeletionError")
|
||||
> | #{translate('user_deletion_error')}
|
||||
> span(ng-switch-default)
|
||||
> | #{translate('generic_something_went_wrong')}
|
||||
> if settings.createV1AccountOnLogin && settings.overleaf
|
||||
> div(ng-if="state.error && state.error.code == 'InvalidCredentialsError'")
|
||||
> 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="/user/password/reset", 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 = !{StringHelper.stringifyJsonForScript(settings.passwordStrengthOptions || {})}
|
||||
Reference in New Issue
Block a user