Adds in new util directive isolate-form used for nested forms that you do not want dirty to propogate upwards to parent forms
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
angular.module("umbraco.directives")
|
||||
.directive('isolateForm', function ($window, $timeout, windowResizeListener) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: ['form', '^form'],
|
||||
link: function(scope, element, attrs, forms) {
|
||||
forms[1].$removeControl(forms[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
<div data-element="dropzone" class="umb-file-dropzone-directive">
|
||||
|
||||
<ng-form name="uploadForm">
|
||||
<ng-form name="uploadForm" isolate-form>
|
||||
|
||||
<!-- Drag and drop files area -->
|
||||
<div ngf-drop
|
||||
|
||||
Reference in New Issue
Block a user