From: Tim Otten Date: Tue, 1 Jul 2014 04:08:44 +0000 (-0700) Subject: CRM-14798 - crmCaseType - Fix handling of labels+validation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=438f2b52e2ac6b9df3c3a74dae22f0485845d2c2;p=civicrm-core.git CRM-14798 - crmCaseType - Fix handling of labels+validation In our UX, labels are supposed to turn red when a field becomes invalid, and they're supposed to include a red "*" if required. This adds an Angular directive to enforce both. --- diff --git a/css/civicrm.css b/css/civicrm.css index 6ad2f09dcc..d56789b8ce 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -4715,9 +4715,9 @@ span.crm-status-icon { text-decoration: line-through; } -.crm-container .ng-invalid { +.crm-container .ng-invalid.ng-dirty { border: 1px solid red; } -.crm-container .ng-valid { +.crm-container .ng-valid, .crm-container .ng-pristine { border: 1px solid #666; } diff --git a/js/angular-crm-ui.js b/js/angular-crm-ui.js index 52c02a2739..db82722007 100644 --- a/js/angular-crm-ui.js +++ b/js/angular-crm-ui.js @@ -1,7 +1,70 @@ /// crmUi: Sundry UI helpers (function (angular, $, _) { + var idCount = 0; angular.module('crmUi', []) + // example:
...