mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 06:13:49 +00:00
Merge pull request #1942 from overleaf/jel-user-settings-form-msg
Move user settings form message next to submit button and add ID attributes GitOrigin-RevId: 3d87242e5a7211f9fa58b07f38a278fb94019046
This commit is contained in:
parent
c8b6b83848
commit
d4a8f38736
1 changed files with 17 additions and 11 deletions
|
@ -16,11 +16,6 @@ block content
|
||||||
if hasFeature('affiliations')
|
if hasFeature('affiliations')
|
||||||
include settings/user-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
|
.row
|
||||||
.col-md-5
|
.col-md-5
|
||||||
h3 #{translate("update_account_info")}
|
h3 #{translate("update_account_info")}
|
||||||
|
@ -31,6 +26,7 @@ block content
|
||||||
.form-group
|
.form-group
|
||||||
label(for='email') #{translate("email")}
|
label(for='email') #{translate("email")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
|
id="email"
|
||||||
type='email',
|
type='email',
|
||||||
name='email',
|
name='email',
|
||||||
placeholder="email@example.com"
|
placeholder="email@example.com"
|
||||||
|
@ -39,7 +35,7 @@ block content
|
||||||
ng-init="email = "+JSON.stringify(user.email),
|
ng-init="email = "+JSON.stringify(user.email),
|
||||||
ng-model-options="{ pdateOn: 'blur' }"
|
ng-model-options="{ pdateOn: 'blur' }"
|
||||||
)
|
)
|
||||||
span.small.text-primary(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
|
span.small.text-danger(ng-show="settingsForm.email.$invalid && settingsForm.email.$dirty")
|
||||||
| #{translate("must_be_email_address")}
|
| #{translate("must_be_email_address")}
|
||||||
else
|
else
|
||||||
// show the email, non-editable
|
// show the email, non-editable
|
||||||
|
@ -54,6 +50,7 @@ block content
|
||||||
.form-group
|
.form-group
|
||||||
label(for='firstName').control-label #{translate("first_name")}
|
label(for='firstName').control-label #{translate("first_name")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
|
id="firstName"
|
||||||
type='text',
|
type='text',
|
||||||
name='first_name',
|
name='first_name',
|
||||||
value=user.first_name
|
value=user.first_name
|
||||||
|
@ -62,11 +59,16 @@ block content
|
||||||
.form-group
|
.form-group
|
||||||
label(for='lastName').control-label #{translate("last_name")}
|
label(for='lastName').control-label #{translate("last_name")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
|
id="lastName"
|
||||||
type='text',
|
type='text',
|
||||||
name='last_name',
|
name='last_name',
|
||||||
value=user.last_name
|
value=user.last_name
|
||||||
ng-non-bindable
|
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
|
.actions
|
||||||
button.btn.btn-primary(
|
button.btn.btn-primary(
|
||||||
type='submit',
|
type='submit',
|
||||||
|
@ -111,18 +113,19 @@ block content
|
||||||
.form-group
|
.form-group
|
||||||
label(for='currentPassword') #{translate("current_password")}
|
label(for='currentPassword') #{translate("current_password")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
|
id="currentPassword"
|
||||||
type='password',
|
type='password',
|
||||||
name='currentPassword',
|
name='currentPassword',
|
||||||
placeholder='*********',
|
placeholder='*********',
|
||||||
ng-model="currentPassword",
|
ng-model="currentPassword",
|
||||||
required
|
required
|
||||||
)
|
)
|
||||||
span.small.text-primary(ng-show="changePasswordForm.currentPassword.$invalid && changePasswordForm.currentPassword.$dirty")
|
span.small.text-danger(ng-show="changePasswordForm.currentPassword.$invalid && changePasswordForm.currentPassword.$dirty" aria-live="polite")
|
||||||
| #{translate("required")}
|
| #{translate("required")}
|
||||||
.form-group
|
.form-group
|
||||||
label(for='newPassword1') #{translate("new_password")}
|
label(for='newPassword1') #{translate("new_password")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
id='passwordField',
|
id='newPassword1',
|
||||||
type='password',
|
type='password',
|
||||||
name='newPassword1',
|
name='newPassword1',
|
||||||
placeholder='*********',
|
placeholder='*********',
|
||||||
|
@ -130,20 +133,23 @@ block content
|
||||||
required,
|
required,
|
||||||
complex-password
|
complex-password
|
||||||
)
|
)
|
||||||
span.small.text-primary(ng-show="changePasswordForm.newPassword1.$error.complexPassword && changePasswordForm.newPassword1.$dirty", ng-bind-html="complexPasswordErrorMessage")
|
span.small.text-danger(ng-show="changePasswordForm.newPassword1.$error.complexPassword && changePasswordForm.newPassword1.$dirty", ng-bind-html="complexPasswordErrorMessage" aria-live="polite")
|
||||||
.form-group
|
.form-group
|
||||||
label(for='newPassword2') #{translate("confirm_new_password")}
|
label(for='newPassword2') #{translate("confirm_new_password")}
|
||||||
input.form-control(
|
input.form-control(
|
||||||
|
id="newPassword2"
|
||||||
type='password',
|
type='password',
|
||||||
name='newPassword2',
|
name='newPassword2',
|
||||||
placeholder='*********',
|
placeholder='*********',
|
||||||
ng-model="newPassword2",
|
ng-model="newPassword2",
|
||||||
equals="passwordField"
|
equals="passwordField"
|
||||||
)
|
)
|
||||||
span.small.text-primary(ng-show="changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$dirty")
|
span.small.text-danger(ng-show="changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$dirty" aria-live="polite")
|
||||||
| #{translate("doesnt_match")}
|
| #{translate("doesnt_match")}
|
||||||
span.small.text-primary(ng-show="!changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty")
|
span.small.text-danger(ng-show="!changePasswordForm.newPassword2.$error.areEqual && changePasswordForm.newPassword2.$invalid && changePasswordForm.newPassword2.$dirty" aria-live="polite")
|
||||||
| #{translate("invalid_password")}
|
| #{translate("invalid_password")}
|
||||||
|
.form-group
|
||||||
|
form-messages(aria-live="polite" for="changePasswordForm")
|
||||||
.actions
|
.actions
|
||||||
button.btn.btn-primary(
|
button.btn.btn-primary(
|
||||||
type='submit',
|
type='submit',
|
||||||
|
|
Loading…
Reference in a new issue