LT-67: Replacing servers list form by components and API instances

This commit is contained in:
Bruno Alves de Faria committed 2016-09-12 10:05:07 -03:00
1 parent e6cb4e873a
commit 72bafdd014
6 files changed
+90 -93

No files matched your search

@@ -35,7 +35,7 @@ OHIF.mixins.form = new OHIF.Mixin({
const validateSelf = component.validate;
component.validate = () => {
// Call the original validation function
validateSelf();
const validationResult = validateSelf();
// Change the form validated flag to true
component.isValidatedAlready = true;
@@ -44,6 +44,8 @@ OHIF.mixins.form = new OHIF.Mixin({
if (component.schema && component.schema._invalidKeys.length) {
instance.$('.state-error :input:first').focus();
}
return validationResult;
};
},
@@ -56,6 +58,7 @@ OHIF.mixins.form = new OHIF.Mixin({
},
events: {
submit: event => event.preventDefault(),
'click .validation-error-container a'(event, instance) {
// Get the target key
const targetKey = $(event.currentTarget).attr('data-target');