Skip to content

Commit

Permalink
Merge pull request #79 from legalthings/form-meta-validation
Browse files Browse the repository at this point in the history
fix meta (in groups) and remove crude validation
  • Loading branch information
svenstm authored Nov 1, 2017
2 parents 1e11ac9 + 71c568f commit 2d89297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions js/legalform-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,9 @@
var meta = this.ractive.get('meta')[keypath[0]];
name = keypath[0];

// if we have a fieldgroup with dots, set the name and set meta to the correct fieldpath
if (keypath.length > 1) {
for (var i = 1; i < keypath.length; i++) {
if (meta) break;

meta = meta[keypath[i]];
name += '.' + keypath[i];
}
Expand Down
5 changes: 1 addition & 4 deletions js/ractive-legalform.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,12 @@
onChangeLegalForm: function (newValue, oldValue, keypath) {
if (this.isCondition(keypath)) {
this.onChangeCondition(newValue, oldValue, keypath);

if (this.validation) this.validation.updateBootstrapValidation();
}

if ($(this.el).hasClass('material')) {
$(this.el).toMaterial();
}


this.updateExpressions(newValue, oldValue, keypath);

setTimeout($.proxy(this.rebuildWizard, this), 200);
Expand Down

0 comments on commit 2d89297

Please sign in to comment.