Merge pull request #3253 from alfonso-salces/MOBILE-3833
MOBILE-3833 mod-quiz: show eye in password inputmain
commit
29b01837c1
|
@ -63,7 +63,7 @@
|
|||
[attr.aria-label]="'core.question.incorrect' | translate"></ion-icon>
|
||||
</ion-item>
|
||||
<ion-button *ngIf="!multiQuestion.disabled" class="ion-text-wrap ion-margin-top" expand="block" fill="outline"
|
||||
[disabled]="!multiQuestion.singleChoiceModel" (click)="clear()" type="reset">
|
||||
[disabled]="!multiQuestion.singleChoiceModel" (click)="clear()" type="button">
|
||||
{{ 'addon.mod_quiz.clearchoice' | translate }}
|
||||
</ion-button>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<ng-content></ng-content>
|
||||
<ion-button fill="clear" [attr.aria-label]="label | translate" core-suppress-events (onClick)="toggle($event)"
|
||||
(mousedown)="doNotBlur($event)" (keydown)="doNotBlur($event)" (keyup)="toggle($event)">
|
||||
<ion-icon [name]=" iconName" slot="icon-only" aria-hidden="true">
|
||||
</ion-icon>
|
||||
<ion-icon [name]="shown ? 'fas-eye-slash' : 'fas-eye'" slot="icon-only" aria-hidden="true"></ion-icon>
|
||||
</ion-button>
|
||||
|
|
|
@ -46,7 +46,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit {
|
|||
|
||||
shown = false; // Whether the password is shown.
|
||||
label = ''; // Label for the button to show/hide.
|
||||
iconName = ''; // Name of the icon of the button to show/hide.
|
||||
|
||||
protected input?: HTMLInputElement; // Input affected.
|
||||
protected element: HTMLElement; // Current element.
|
||||
|
@ -99,7 +98,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit {
|
|||
*/
|
||||
protected setData(input: HTMLInputElement): void {
|
||||
this.label = this.shown ? 'core.hide' : 'core.show';
|
||||
this.iconName = this.shown ? 'fas-eye-slash' : 'fas-eye';
|
||||
input.type = this.shown ? 'text' : 'password';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue