From 6c442b8eb5e410ebf0784b10cdfc9c9a8ac5490b Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Mon, 25 Nov 2013 14:09:06 +0200 Subject: web client: do not fail when trying to validate non-editable field --- web/client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/client.js') diff --git a/web/client.js b/web/client.js index 1c5ffae..38c8515 100644 --- a/web/client.js +++ b/web/client.js @@ -495,10 +495,8 @@ $(function() { this.name = name; this.editable = editable && meta.editable; - if (this.editable) { - this.onChange(this.validate); - if (data.status(name) == "invalid") this.validate(); - } + this.onChange(this.validate); + if (data.status(name) == "invalid") this.validate(); return el; }; @@ -531,6 +529,8 @@ $(function() { } Field.validate = function() { + if (!this.editable) return; + this.msg.text("[checking]"); statusBar.setError("Validating changes", "validate"); -- cgit v1.2.3