Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2387)

Unified Diff: chrome/browser/resources/settings/site_settings/edit_exception_dialog.js

Issue 2783513002: MD Settings: Display error messages in "add" and "edit" exception dialogs. (Closed)
Patch Set: Remove left overs (again) Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/edit_exception_dialog.js
diff --git a/chrome/browser/resources/settings/site_settings/edit_exception_dialog.js b/chrome/browser/resources/settings/site_settings/edit_exception_dialog.js
index 968b5d10396637b4f04ae1bf8aa06e28a1c4e8ea..da0842c9080b592a943e3ad4a1e05425d739cf16 100644
--- a/chrome/browser/resources/settings/site_settings/edit_exception_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/edit_exception_dialog.js
@@ -17,6 +17,15 @@ Polymer({
/** @private */
origin_: String,
+
+ /**
+ * Whether the current input is invalid.
+ * @private
+ */
+ invalid_: {
+ type: Boolean,
+ value: false,
+ },
},
/** @private {!settings.SiteSettingsPrefsBrowserProxy} */
@@ -68,8 +77,13 @@ Polymer({
/** @private */
validate_: function() {
+ if (this.$$('paper-input').value.trim() == '') {
+ this.invalid_ = true;
+ return;
+ }
+
this.browserProxy_.isPatternValid(this.origin_).then(function(isValid) {
- this.$.actionButton.disabled = !isValid;
+ this.invalid_ = !isValid;
}.bind(this));
},
});

Powered by Google App Engine
This is Rietveld 408576698