This commit is contained in:
parent
039de2f485
commit
c86089ea6d
|
@ -1,13 +1,28 @@
|
||||||
<h5 class="vn-mb-md vn-mt-lg" translate>Recover password</h5>
|
<h5 class="vn-mb-md vn-mt-lg" translate>Recover password</h5>
|
||||||
|
<vn-check
|
||||||
|
label="Recibir por SMS"
|
||||||
|
ng-model="$ctrl.sms"
|
||||||
|
name="sms">
|
||||||
|
</vn-check>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
ng-if="!$ctrl.sms"
|
||||||
label="User or recovery email"
|
label="User or recovery email"
|
||||||
ng-model="$ctrl.user"
|
ng-model="$ctrl.user"
|
||||||
vn-focus>
|
vn-focus>
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<div
|
<vn-textfield
|
||||||
class="text-secondary"
|
ng-if="$ctrl.sms"
|
||||||
translate>
|
label="User's phone"
|
||||||
We will sent you an email to recover your password
|
ng-model="$ctrl.user"
|
||||||
|
vn-focus>
|
||||||
|
</vn-textfield>
|
||||||
|
<div class="text-secondary">
|
||||||
|
<span ng-if="$ctrl.sms" translate>
|
||||||
|
We will sent you a sms
|
||||||
|
</span>
|
||||||
|
<span ng-if="!$ctrl.sms" translate>
|
||||||
|
We will sent you an email to recover your password
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<vn-submit label="Recover password" ng-click="$ctrl.submit()"></vn-submit>
|
<vn-submit label="Recover password" ng-click="$ctrl.submit()"></vn-submit>
|
||||||
|
|
|
@ -10,6 +10,13 @@ export default class Controller {
|
||||||
$translate,
|
$translate,
|
||||||
$state
|
$state
|
||||||
});
|
});
|
||||||
|
$scope.$watch('$ctrl.user', function(nuevoValor, antiguoValor) {
|
||||||
|
// Esta función se ejecutará cada vez que numeroMovil cambie
|
||||||
|
console.log($scope);
|
||||||
|
let isSms = /([+]\d{2})?\d{9}$/ig.test(nuevoValor ?? '');
|
||||||
|
$scope.$ctrl.sms = isSms;
|
||||||
|
// Aquí puedes realizar las acciones que desees con el nuevo valor
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToLogin() {
|
goToLogin() {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
Recover password: Recuperar contraseña
|
Recover password: Recuperar contraseña
|
||||||
We will sent you an email to recover your password: Te enviaremos un correo para restablecer tu contraseña
|
We will sent you an email to recover your password: Te enviaremos un correo para restablecer tu contraseña
|
||||||
|
We will sent you a sms: Te enviaremos un sms para restablecer tu contraseña
|
||||||
Notification sent!: ¡Notificación enviada!
|
Notification sent!: ¡Notificación enviada!
|
||||||
User or recovery email: Usuario o correo de recuperación
|
User or recovery email: Usuario o correo de recuperación
|
||||||
|
User's phone: Móvil del usuario
|
||||||
|
|
Loading…
Reference in New Issue