From f426e3c50048b349d1a7bb1f2e223ebc216836e2 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 11 Aug 2017 12:14:10 +0200 Subject: [PATCH] U4-10280 Add markers to required fields in user section --- .../components/html/umbcontrolgroup.directive.js | 7 ++++--- .../src/views/components/html/umb-control-group.html | 3 +++ .../src/views/components/users/change-password.html | 6 +++--- src/Umbraco.Web.UI.Client/src/views/users/user.html | 6 +++--- .../src/views/users/views/users/users.html | 10 +++++----- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbcontrolgroup.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbcontrolgroup.directive.js index 94ab5537dc..c4382240c0 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbcontrolgroup.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbcontrolgroup.directive.js @@ -10,8 +10,9 @@ angular.module("umbraco.directives.html") label: "@label", description: "@", hideLabel: "@", - alias: "@", - labelFor: "@" + alias: "@", + labelFor: "@", + required: "@?" }, require: '?^form', transclude: true, @@ -21,7 +22,7 @@ angular.module("umbraco.directives.html") link: function (scope, element, attr, formCtrl) { scope.formValid = function () { - if (formCtrl && scope.labelFor) { + if (formCtrl && scope.labelFor) { //if a label-for has been set, use that for the validation return formCtrl[scope.labelFor].$valid; } diff --git a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-control-group.html b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-control-group.html index 06cb444cd5..d1356066c2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-control-group.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-control-group.html @@ -3,6 +3,9 @@
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html b/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html index a4e99546fa..790f2d1df6 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/users/change-password.html @@ -22,7 +22,7 @@ - + - + - +
- + - +
- +
- + Required - + Required - - + + - +