Procházet zdrojové kódy

Helpdesk verification dialog - turn off autocomplete and fix bug where tokenSendMethod for sendVerificationToken API request should have been lowercase instead of uppercase

Joseph White před 7 roky
rodič
revize
bcaac123cc

+ 1 - 1
client/src/helpdesk/verifications-dialog.controller.ts

@@ -123,7 +123,7 @@ export default class VerificationsDialogController {
             this.status = STATUS_WAIT;
             this.configService.getTokenSendMethod()
                 .then((tokenSendMethod) => {
-                    let choice = (tokenSendMethod === TOKEN_CHOICE) ? method : null;
+                    let choice = (tokenSendMethod === TOKEN_CHOICE) ? method.toLowerCase() : null;
                     return this.helpDeskService.sendVerificationToken(this.personUserKey, choice);
                 })
                 .then((response: any) => {

+ 6 - 3
client/src/helpdesk/verifications-dialog.template.html

@@ -57,7 +57,10 @@
                     <div ng-switch-when="ATTRIBUTES">
                         <div class="ias-input-container" ng-repeat="input in $ctrl.inputs">
                             <label ng-attr-for="{{input.name}}" ng-bind="input.label"></label>
-                            <input ng-attr-id="{{input.name}}" type="text" ng-model="$ctrl.formData[input.name]">
+                            <input autocomplete="off"
+                                   ng-attr-id="{{input.name}}"
+                                   type="text"
+                                   ng-model="$ctrl.formData[input.name]">
                         </div>
                     </div>
                     <div ng-switch-when="EMAIL|SMS" ng-switch-when-separator="|">
@@ -67,7 +70,7 @@
                         </div>
                         <div class="ias-input-container">
                             <label>Token</label>
-                            <input id="token" type="text" ng-model="$ctrl.formData.code">
+                            <input autocomplete="off" id="token" type="text" ng-model="$ctrl.formData.code">
                         </div>
 
                     </div>
@@ -75,7 +78,7 @@
                         <p ng-bind="'Display_HelpdeskOtpValidation' | translate"></p>
                         <div class="ias-input-container">
                             <label>Code</label>
-                            <input id="code" type="text" ng-model="$ctrl.formData.code">
+                            <input autocomplete="off" id="code" type="text" ng-model="$ctrl.formData.code">
                         </div>
                     </div>