Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMBARI-25472: Disable autocomplete on login screen #3536

Merged
merged 1 commit into from Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<form class="form-horizontal add-property-window" autocomplete="off">
<form autocomplete="off" class="form-horizontal add-property-window">
<div class="each-row form-group">
<label class="control-label col-md-2">{{t common.type}}</label>

Expand Down
Expand Up @@ -26,7 +26,7 @@

<div class="panel-body collapse in" {{bindAttr style="view.isCategoryBodyVisible"}}>
<div class="service-config-section">
<form class="form-horizontal" autocomplete="off">
<form autocomplete="off" class="form-horizontal">

<div class="entry-row row">
{{view App.RadioButtonView name="createNotification"
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/templates/common/configs/overrideWindow.hbs
Expand Up @@ -17,7 +17,7 @@
}}

{{! #with view.categoryConfigProperty}}
<form class="form-horizontal mbm" autocomplete="off">
<form autocomplete="off" class="form-horizontal mbm">
<div class="override-controls">
<div class="alert alert-info">{{view.parentView.dialogMessage}}</div>
{{#if view.parentView.warningMessage}}
Expand Down
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<form class="form-horizontal pre-scrollable" autocomplete="off">
<form autocomplete="off" class="form-horizontal pre-scrollable">
{{#each view.parentView.content.configs}}
{{#if isVisible}}
<div class="rw-fluid control-group">
Expand Down
Expand Up @@ -34,7 +34,7 @@

<div class="panel-body collapse in" {{bindAttr style="view.isCategoryBodyVisible"}} {{QAAttr "panel-body"}}>
<div class="service-config-section">
<form class="form-horizontal" autocomplete="off">
<form autocomplete="off" class="form-horizontal">
{{#each configData in view.categoryConfigs}}
{{#unless configData.isInDefaultTheme}} {{! configs related to default themes should not be shown on the Advanced tab }}
{{#if configData.isComparison}}
Expand Down
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<p class="alert alert-info">
{{view.formHeader}}
</p>
Expand Down
Expand Up @@ -19,7 +19,7 @@
<div class="alert alert-warning">
{{view.warningMsg}}
</div>
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div class="control-group">
<label class="control-label">{{t popup.invalid.KDC.admin.principal}}</label>
{{view Ember.TextField valueBinding="view.parentView.principal" class="form-control"}}
Expand Down
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div class="form-group form-text">
<div class="col-sm-3 align-right"><strong>{{view.serviceName}}&nbsp;</strong>&nbsp;</div>
<div class="col-sm-7">
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/templates/login.hbs
Expand Up @@ -31,7 +31,7 @@
</div>
<div class="form-group">
<label {{QAAttr "password-label"}}>{{t common.password}}</label>
{{view view.passTextField type="password" valueBinding="password" class="form-control" disabledBinding="isSubmitDisabled" data-qa="password-input"}}
{{view view.passTextField valueBinding="password" class="form-control" disabledBinding="isSubmitDisabled" data-qa="password-input"}}
</div>
<button class="btn btn-success" {{QAAttr "login-button"}} {{bindAttr disabled="isSubmitDisabled"}} {{action "submit" target="controller"}}>{{t login.loginButton}}</button>
</form>
Expand Down
Expand Up @@ -22,7 +22,7 @@ right ownership. The ASF licenses this file

<div class="panel panel-default">
<div class="panel-body">
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div {{bindAttr class=":form-group showloadBalancerURLError:error showloadBalancerURLError:has-error :col-md-12"}}>
<label class="control-label">{{t admin.ra_highAvailability.wizard.step1.load_balancer_url}}:</label>

Expand Down
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<form class="form-horizontal alert-configs">
<form autocomplete="off" class="form-horizontal alert-configs">
<div {{bindAttr class="controller.isErrorWithNewCustomPropertyName:error :form-group"}}>
<label class="control-label col-md-3">{{t common.name}} </label>

Expand Down
Expand Up @@ -17,7 +17,7 @@
}}

{{#if view.parentView.isLoaded}}
<form class="form-horizontal mbm" autocomplete="off">
<form autocomplete="off" class="form-horizontal mbm">
<div class="override-controls">
<div class="alert alert-info">{{view.parentView.dialogMessage}}</div>
{{#if view.parentView.warningMessage}}
Expand Down
4 changes: 2 additions & 2 deletions ambari-web/app/templates/main/alerts/configs.hbs
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<form class="form-horizontal alert-configs">
<form autocomplete="off" class="form-horizontal alert-configs">
{{#each property in controller.configs}}
{{#unless property.hidden}}
<div {{bindAttr class=":form-group property.name property.isValid::has-error"}}>
Expand All @@ -41,4 +41,4 @@
{{view.errorMessage}}
</div>
{{/if}}
</form>
</form>
Expand Up @@ -18,7 +18,7 @@

<div id="create-edit-alert-notification row">

<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">

{{! alert-notification name }}
<div {{bindAttr class=":form-group controller.inputFields.name.errorMsg:has-error"}}>
Expand Down
Expand Up @@ -24,7 +24,7 @@
&nbsp;
{{/if}}
</div>
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div class="form-group">
<label class="control-label col-md-3">{{t common.name}}: &nbsp;</label>
<div class="col-md-7">
Expand Down
4 changes: 2 additions & 2 deletions ambari-web/app/templates/main/dashboard/edit_widget_popup.hbs
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<form class="form-horizontal" autocomplete="off">
<form autocomplete="off" class="form-horizontal">
<div class="each-row">
<div class="alert alert-info">
{{{view.parentView.widgetView.hintInfo}}}
Expand Down Expand Up @@ -49,4 +49,4 @@
</div>
</div>

</form>
</form>
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
}}

<form class="form-horizontal" autocomplete="off">
<form autocomplete="off" class="form-horizontal">
<div class="each-row">
<div class="alert alert-info">
{{{view.parentView.widgetView.hintInfo}}}
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/templates/main/service/new_config_group.hbs
Expand Up @@ -26,7 +26,7 @@
</div>
<div class="row">
<div class="col-md-12">
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div class="form-group">
<label class="col-md-2 control-label">{{t services.service.config_groups_popup.group_name_lable }}:&nbsp;</label>
<div class="col-md-6">
Expand Down
Expand Up @@ -32,7 +32,7 @@
{{#if widgetPropertiesViews.length}}
<div class="panel panel-default">
<div class="panel-body">
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
{{#each property in widgetPropertiesViews}}
<div {{bindAttr class="property.name property.isValid::error"}}>
<div class="form-group row">
Expand Down Expand Up @@ -61,4 +61,4 @@
{{/unless}}
<button id="add-widget-step2-next" class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action "next" target="controller"}}>{{t common.next}} &rarr;</button>
</div>
</div>
</div>
Expand Up @@ -20,7 +20,7 @@
<h4 class="step-title">{{t widget.create.wizard.step3.header}}</h4>
<div class="panel panel-default">
<div class="panel-body">
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div {{bindAttr class="isNameInvalid:has-error :row :form-group"}}>
<div class="col-md-2 title">
<label class="control-label">{{t widget.create.wizard.step3.widgetName}}<i class="glyphicon glyphicon-asterisk"></i></label>
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/templates/wizard/step1.hbs
Expand Up @@ -78,7 +78,7 @@
{{#if App.router.nextBtnClickInProgress}}
{{view App.SpinnerView}}
{{else}}
<form id="repoVersionInfoForm" class="form-horizontal" role="form" name="localVersionInfoForm" novalidate>
<form autocomplete="off" id="repoVersionInfoForm" class="form-horizontal" role="form" name="localVersionInfoForm" novalidate>

<div class="panel panel-default repos-panel">
<div class="step-title">
Expand Down
4 changes: 2 additions & 2 deletions ambari-web/app/templates/wizard/step1_addLocalRepository.hbs
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
<form class="form-horizontal" id="addLocalRepositoryPopup" autocomplete="off">
<form autocomplete="off" class="form-horizontal" id="addLocalRepositoryPopup">
<div class="each-row">
<label class="control-label">{{t installer.step1.advancedRepo.localRepo.label.os}}</label>
<div class="btn-group">
Expand Down Expand Up @@ -52,4 +52,4 @@
Provide location of the local repository for the selected OS
</div>
{{/if}}
</form>
</form>
Expand Up @@ -23,7 +23,7 @@
{{t installer.step3.hostWarningsPopup.notice.beginning}}</span>
</div>
<div class="row">
<form class="form-horizontal">
<form autocomplete="off" class="form-horizontal">
<div class="from-group">
<div class="col-md-2">
<label class="control-label">
Expand Down
11 changes: 10 additions & 1 deletion ambari-web/app/views/login.js
Expand Up @@ -31,6 +31,15 @@ App.LoginView = Em.View.extend({
passTextField : Em.TextField.extend({
insertNewline: function(){
this.get("controller").submit();
},
didInsertElement: function(){
var self = this;
this._super();
this.$().attr('autocomplete', 'new-password');
// Hack to off autocomplete
this.$().on('focus', function () {
self.$().attr('type', 'password');
});
}
})
});
});