From 20d3f4537a578c581285ae8c90da2af9f929be66 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 13 Jul 2019 23:41:11 +0200 Subject: many changes to forms. starting to add labels --- StoneIsland/www/js/lib/view/Serializable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js/lib/view') diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index 4155f102..3181fddd 100755 --- a/StoneIsland/www/js/lib/view/Serializable.js +++ b/StoneIsland/www/js/lib/view/Serializable.js @@ -105,6 +105,7 @@ var SerializableView = View.extend({ console.log(errors) var msgs = [] this.$('.error_hilite').removeClass('error_hilite') + this.$('.err').html('') errors.forEach(function(e, i){ // if (i > 0) { return } if (e[0]) { @@ -112,13 +113,15 @@ var SerializableView = View.extend({ var el = $el[0] if (el && el.nodeName === 'SELECT') { $el.parent().addClass('error_hilite') + $el.parent().next('.err').html(e[1]) } else { $el.addClass('error_hilite') + $el.next('.err').html(e[1]) } } - msgs.push(e[1]) + // msgs.push(e[1]) }.bind(this)) - this.$msg.html(msgs.join("
")) + // this.$msg.html(msgs.join("
")) this.$msg.addClass('alert-notice') }, -- cgit v1.2.3-70-g09d2