|
1 | 1 | <template>
|
2 |
| - <div class="change-password-container mx-auto ml-md-5 mb-3"> |
| 2 | + <div class="change-password-container"> |
3 | 3 | <alert variant="danger" class="mb-4">
|
4 | 4 | <p v-if="changePasswordError">
|
5 | 5 | {{ $t('pageChangePassword.changePasswordError') }}
|
6 | 6 | </p>
|
7 | 7 | <p v-else>{{ $t('pageChangePassword.changePasswordAlertMessage') }}</p>
|
8 | 8 | </alert>
|
9 |
| - <dl> |
10 |
| - <dt>{{ $t('pageChangePassword.username') }}</dt> |
11 |
| - <dd>{{ username }}</dd> |
12 |
| - </dl> |
13 |
| - <b-form novalidate @submit.prevent="changePassword"> |
14 |
| - <b-form-group |
15 |
| - label-for="password" |
16 |
| - :label="$t('pageChangePassword.newPassword')" |
17 |
| - > |
18 |
| - <input-password-toggle> |
19 |
| - <b-form-input |
20 |
| - id="password" |
21 |
| - v-model="form.password" |
22 |
| - autofocus="autofocus" |
23 |
| - type="password" |
24 |
| - :state="getValidationState($v.form.password)" |
25 |
| - class="form-control-with-button" |
26 |
| - @change="$v.form.password.$touch()" |
27 |
| - > |
28 |
| - </b-form-input> |
29 |
| - <b-form-invalid-feedback role="alert"> |
30 |
| - <template v-if="!$v.form.password.required"> |
31 |
| - {{ $t('global.form.fieldRequired') }} |
32 |
| - </template> |
33 |
| - </b-form-invalid-feedback> |
34 |
| - </input-password-toggle> |
35 |
| - </b-form-group> |
36 |
| - <b-form-group |
37 |
| - label-for="password-confirm" |
38 |
| - :label="$t('pageChangePassword.confirmNewPassword')" |
39 |
| - > |
40 |
| - <input-password-toggle> |
41 |
| - <b-form-input |
42 |
| - id="password-confirm" |
43 |
| - v-model="form.passwordConfirm" |
44 |
| - type="password" |
45 |
| - :state="getValidationState($v.form.passwordConfirm)" |
46 |
| - class="form-control-with-button" |
47 |
| - @change="$v.form.passwordConfirm.$touch()" |
48 |
| - > |
49 |
| - </b-form-input> |
50 |
| - <b-form-invalid-feedback role="alert"> |
51 |
| - <template v-if="!$v.form.passwordConfirm.required"> |
52 |
| - {{ $t('global.form.fieldRequired') }} |
53 |
| - </template> |
54 |
| - <template v-else-if="!$v.form.passwordConfirm.sameAsPassword"> |
55 |
| - {{ $t('global.form.passwordsDoNotMatch') }} |
56 |
| - </template> |
57 |
| - </b-form-invalid-feedback> |
58 |
| - </input-password-toggle> |
59 |
| - </b-form-group> |
60 |
| - <div class="text-right"> |
61 |
| - <b-button type="button" variant="link" @click="goBack"> |
62 |
| - {{ $t('pageChangePassword.goBack') }} |
63 |
| - </b-button> |
64 |
| - <b-button type="submit" variant="primary"> |
65 |
| - {{ $t('pageChangePassword.changePassword') }} |
66 |
| - </b-button> |
67 |
| - </div> |
68 |
| - </b-form> |
| 9 | + <div class="change-password__form-container"> |
| 10 | + <dl> |
| 11 | + <dt>{{ $t('pageChangePassword.username') }}</dt> |
| 12 | + <dd>{{ username }}</dd> |
| 13 | + </dl> |
| 14 | + <b-form novalidate @submit.prevent="changePassword"> |
| 15 | + <b-form-group |
| 16 | + label-for="password" |
| 17 | + :label="$t('pageChangePassword.newPassword')" |
| 18 | + > |
| 19 | + <input-password-toggle> |
| 20 | + <b-form-input |
| 21 | + id="password" |
| 22 | + v-model="form.password" |
| 23 | + autofocus="autofocus" |
| 24 | + type="password" |
| 25 | + :state="getValidationState($v.form.password)" |
| 26 | + class="form-control-with-button" |
| 27 | + @change="$v.form.password.$touch()" |
| 28 | + > |
| 29 | + </b-form-input> |
| 30 | + <b-form-invalid-feedback role="alert"> |
| 31 | + <template v-if="!$v.form.password.required"> |
| 32 | + {{ $t('global.form.fieldRequired') }} |
| 33 | + </template> |
| 34 | + </b-form-invalid-feedback> |
| 35 | + </input-password-toggle> |
| 36 | + </b-form-group> |
| 37 | + <b-form-group |
| 38 | + label-for="password-confirm" |
| 39 | + :label="$t('pageChangePassword.confirmNewPassword')" |
| 40 | + > |
| 41 | + <input-password-toggle> |
| 42 | + <b-form-input |
| 43 | + id="password-confirm" |
| 44 | + v-model="form.passwordConfirm" |
| 45 | + type="password" |
| 46 | + :state="getValidationState($v.form.passwordConfirm)" |
| 47 | + class="form-control-with-button" |
| 48 | + @change="$v.form.passwordConfirm.$touch()" |
| 49 | + > |
| 50 | + </b-form-input> |
| 51 | + <b-form-invalid-feedback role="alert"> |
| 52 | + <template v-if="!$v.form.passwordConfirm.required"> |
| 53 | + {{ $t('global.form.fieldRequired') }} |
| 54 | + </template> |
| 55 | + <template v-else-if="!$v.form.passwordConfirm.sameAsPassword"> |
| 56 | + {{ $t('global.form.passwordsDoNotMatch') }} |
| 57 | + </template> |
| 58 | + </b-form-invalid-feedback> |
| 59 | + </input-password-toggle> |
| 60 | + </b-form-group> |
| 61 | + <div class="text-right"> |
| 62 | + <b-button type="button" variant="link" @click="goBack"> |
| 63 | + {{ $t('pageChangePassword.goBack') }} |
| 64 | + </b-button> |
| 65 | + <b-button type="submit" variant="primary"> |
| 66 | + {{ $t('pageChangePassword.changePassword') }} |
| 67 | + </b-button> |
| 68 | + </div> |
| 69 | + </b-form> |
| 70 | + </div> |
69 | 71 | </div>
|
70 | 72 | </template>
|
71 | 73 |
|
@@ -124,7 +126,9 @@ export default {
|
124 | 126 | </script>
|
125 | 127 |
|
126 | 128 | <style lang="scss" scoped>
|
127 |
| -.change-password-container { |
128 |
| - max-width: 360px; |
| 129 | +.change-password__form-container { |
| 130 | + @include media-breakpoint-up('md') { |
| 131 | + max-width: 360px; |
| 132 | + } |
129 | 133 | }
|
130 | 134 | </style>
|
0 commit comments