mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 09:19:33 -05:00
Merge pull request #899 from sharelatex/sk-account-delete-confirm-delete-sharelatex
Add another confirmation checkbox to account-delete.
This commit is contained in:
commit
29e9d5a1e6
3 changed files with 28 additions and 7 deletions
|
@ -207,6 +207,7 @@ block content
|
||||||
focus-on="open",
|
focus-on="open",
|
||||||
ng-keyup="checkValidation()"
|
ng-keyup="checkValidation()"
|
||||||
)
|
)
|
||||||
|
|
||||||
label #{translate('password')}
|
label #{translate('password')}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
type="password",
|
type="password",
|
||||||
|
@ -215,12 +216,23 @@ block content
|
||||||
ng-model="state.password",
|
ng-model="state.password",
|
||||||
ng-keyup="checkValidation()"
|
ng-keyup="checkValidation()"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
div.confirmation-checkbox-wrapper
|
||||||
input(
|
input(
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
ng-model="state.confirmV1Purge"
|
ng-model="state.confirmV1Purge"
|
||||||
ng-change="checkValidation()"
|
ng-change="checkValidation()"
|
||||||
)
|
).pull-left
|
||||||
label I have left or purged my projects on Overleaf v1 (if any)
|
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(ng-if="state.error")
|
||||||
div.alert.alert-danger
|
div.alert.alert-danger
|
||||||
| #{translate('generic_something_went_wrong')}
|
| #{translate('generic_something_went_wrong')}
|
||||||
|
|
|
@ -43,17 +43,20 @@ define [
|
||||||
deleteText: ""
|
deleteText: ""
|
||||||
password: ""
|
password: ""
|
||||||
confirmV1Purge: false
|
confirmV1Purge: false
|
||||||
|
confirmSharelatexDelete: false
|
||||||
inflight: false
|
inflight: false
|
||||||
error: false
|
error: false
|
||||||
invalidCredentials: false
|
invalidCredentials: false
|
||||||
|
|
||||||
|
$scope.userDefaultEmail = userDefaultEmail
|
||||||
|
|
||||||
$modalInstance.opened.then () ->
|
$modalInstance.opened.then () ->
|
||||||
$timeout () ->
|
$timeout () ->
|
||||||
$scope.$broadcast "open"
|
$scope.$broadcast "open"
|
||||||
, 700
|
, 700
|
||||||
|
|
||||||
$scope.checkValidation = ->
|
$scope.checkValidation = ->
|
||||||
$scope.state.isValid = userDefaultEmail? and $scope.state.deleteText == userDefaultEmail and $scope.state.password.length > 0 and $scope.state.confirmV1Purge
|
$scope.state.isValid = userDefaultEmail? and $scope.state.deleteText == userDefaultEmail and $scope.state.password.length > 0 and $scope.state.confirmV1Purge and $scope.state.confirmSharelatexDelete
|
||||||
|
|
||||||
$scope.delete = () ->
|
$scope.delete = () ->
|
||||||
$scope.state.inflight = true
|
$scope.state.inflight = true
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
.confirmation-checkbox-wrapper {
|
||||||
|
padding-top: 8px;
|
||||||
|
input {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.affiliations-table {
|
.affiliations-table {
|
||||||
|
|
Loading…
Reference in a new issue