Merge pull request #1016 from umbraco/temp-U4-7630

Fixes: U4-7630 Cannot save a document type when it has a date picker …
This commit is contained in:
Mads Rasmussen
2016-01-13 10:23:31 +01:00
6 changed files with 36 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
(function() {
'use strict';
function UmbDisableFormValidation() {
var directive = {
restrict: 'A',
require: '?form',
link: function (scope, elm, attrs, ctrl) {
//override the $setValidity function of the form to disable validation
ctrl.$setValidity = function () { };
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbDisableFormValidation', UmbDisableFormValidation);
})();

View File

@@ -279,6 +279,10 @@ input.umb-group-builder__group-sort-value {
cursor: auto;
}
.umb-group-builder__property-preview .help-inline {
display:none !important;
}
.umb-group-builder__property-preview-overlay {
position: absolute;
top: 0;

View File

@@ -1 +1,2 @@
<div ng-include="propertyEditorView"></div>
<div ng-include="propertyEditorView"></div>

View File

@@ -171,7 +171,12 @@
<span ng-if="property.dataTypeName == undefined">Preview</span>
</span>
<umb-property-editor model="property" ng-if="property.view !== undefined"></umb-property-editor>
<ng-form name="propertyEditorPreviewForm" umb-disable-form-validation>
<umb-property-editor
ng-if="property.view !== undefined"
model="property">
</umb-property-editor>
</ng-form>
</div>

View File

@@ -1,2 +1,3 @@
<textarea ng-model="model.value" id="{{model.alias}}" name="textarea" rows="10" class="umb-editor umb-textarea textstring" val-server="value"></textarea>
<textarea ng-model="model.value" id="{{model.alias}}" name="textarea" rows="10" class="umb-editor umb-textarea textstring" val-server="value" ng-required="model.validation.mandatory"></textarea>
<span class="help-inline" val-msg-for="textarea" val-toggle-msg="required">Required</span>
<span class="help-inline" val-msg-for="textarea" val-toggle-msg="valServer"></span>

View File

@@ -2,6 +2,8 @@
<input type="text" name="textbox" ng-model="model.value" id="{{model.alias}}"
class="umb-editor umb-textstring textstring"
val-server="value"
ng-required="model.validation.mandatory"
ng-trim="false" />
<span class="help-inline" val-msg-for="textbox" val-toggle-msg="valServer"></span>
<span class="help-inline" val-msg-for="textbox" val-toggle-msg="required">Required</span>
</div>