From 2fe3aa53b18d8271306fbdefecd2da994a6e7a27 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Fri, 2 Apr 2021 19:21:33 +0530 Subject: [PATCH] disable autocomplete when similar-topics validation is enabled (#85) --- .../wizard/templates/components/field-validators.hbs | 2 +- .../wizard/templates/components/wizard-field-text.hbs | 2 +- assets/javascripts/wizard/templates/components/wizard-field.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/wizard/templates/components/field-validators.hbs b/assets/javascripts/wizard/templates/components/field-validators.hbs index d765f7ae..704c5c63 100644 --- a/assets/javascripts/wizard/templates/components/field-validators.hbs +++ b/assets/javascripts/wizard/templates/components/field-validators.hbs @@ -3,7 +3,7 @@ {{component validation.component field=field type=type validation=validation}} {{/each-in}} - {{yield (hash perform=(action 'perform'))}} + {{yield (hash perform=(action 'perform') autocomplete="off")}} {{#each-in field.validations.below as |type validation|}} {{component validation.component field=field type=type validation=validation}} diff --git a/assets/javascripts/wizard/templates/components/wizard-field-text.hbs b/assets/javascripts/wizard/templates/components/wizard-field-text.hbs index 73db639c..be44e8e7 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-text.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-text.hbs @@ -1 +1 @@ -{{input id=field.id value=field.value class=fieldClass placeholder=field.placeholder tabindex=field.tabindex}} +{{input id=field.id value=field.value class=fieldClass placeholder=field.placeholder tabindex=field.tabindex autocomplete=autocomplete}} diff --git a/assets/javascripts/wizard/templates/components/wizard-field.hbs b/assets/javascripts/wizard/templates/components/wizard-field.hbs index b0563384..3a3c70d8 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field.hbs @@ -13,7 +13,7 @@ {{#field-validators field=field as |validators|}} {{#if inputComponentName}}
- {{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard }} + {{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}}
{{/if}} {{/field-validators}}