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>
|
||||
<vn-check
|
||||
label="Recibir por SMS"
|
||||
ng-model="$ctrl.sms"
|
||||
name="sms">
|
||||
</vn-check>
|
||||
<vn-textfield
|
||||
ng-if="!$ctrl.sms"
|
||||
label="User or recovery email"
|
||||
ng-model="$ctrl.user"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
<div
|
||||
class="text-secondary"
|
||||
translate>
|
||||
We will sent you an email to recover your password
|
||||
<vn-textfield
|
||||
ng-if="$ctrl.sms"
|
||||
label="User's phone"
|
||||
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 class="footer">
|
||||
<vn-submit label="Recover password" ng-click="$ctrl.submit()"></vn-submit>
|
||||
|
|
|
@ -10,6 +10,13 @@ export default class Controller {
|
|||
$translate,
|
||||
$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() {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
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 a sms: Te enviaremos un sms para restablecer tu contraseña
|
||||
Notification sent!: ¡Notificación enviada!
|
||||
User or recovery email: Usuario o correo de recuperación
|
||||
User's phone: Móvil del usuario
|
||||
|
|
Loading…
Reference in New Issue