Skip to content

Commit ec5f3b8

Browse files
author
Tom Kirkpatrick
committed
Include success and feedback details in html template
1 parent 69baddf commit ec5f3b8

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

bootstrap-datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/datepicker/datepicker.html","<div class=\"form-group\" ng-class=\"{\'has-error\': hasError()}\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n\n <input ng-show=\"form.key\"\n style=\"background-color: white\"\n type=\"text\"\n class=\"form-control\"\n schema-validate=\"form\"\n ng-model=\"$$value$$\"\n pick-a-date\n min-date=\"form.minDate\"\n max-date=\"form.maxDate\"\n format=\"form.format\" />\n\n <span class=\"help-block\">{{ (hasError() && errorMessage(schemaError())) || form.description}}</span>\n</div>\n");}]);
1+
angular.module("schemaForm").run(["$templateCache", function($templateCache) {$templateCache.put("directives/decorators/bootstrap/datepicker/datepicker.html","<div class=\"form-group\" ng-class=\"{\'has-error\': hasError(), \'has-success\': hasSuccess(), \'has-feedback\': form.feedback !== false }\">\n <label class=\"control-label\" ng-show=\"showTitle()\">{{form.title}}</label>\n\n <input ng-show=\"form.key\"\n style=\"background-color: white\"\n type=\"text\"\n class=\"form-control\"\n schema-validate=\"form\"\n ng-model=\"$$value$$\"\n pick-a-date\n min-date=\"form.minDate\"\n max-date=\"form.maxDate\"\n format=\"form.format\" />\n\n <span ng-if=\"form.feedback !== false\"\n class=\"form-control-feedback\"\n ng-class=\"evalInScope(form.feedback) || {\'glyphicon\': true, \'glyphicon-ok\': hasSuccess(), \'glyphicon-remove\': hasError() }\"></span>\n\n <div class=\"help-block\"\n ng-show=\"(hasError() && errorMessage(schemaError())) || form.description\"\n ng-bind-html=\"(hasError() && errorMessage(schemaError())) || form.description\"></div>\n</div>\n");}]);
22
angular.module('schemaForm').directive('pickADate', function () {
33

44
//String dates for min and max is not supported

bootstrap-datepicker.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datepicker.html

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="form-group" ng-class="{'has-error': hasError()}">
1+
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false }">
22
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
33

44
<input ng-show="form.key"
@@ -12,5 +12,11 @@
1212
max-date="form.maxDate"
1313
format="form.format" />
1414

15-
<span class="help-block">{{ (hasError() && errorMessage(schemaError())) || form.description}}</span>
15+
<span ng-if="form.feedback !== false"
16+
class="form-control-feedback"
17+
ng-class="evalInScope(form.feedback) || {'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"></span>
18+
19+
<div class="help-block"
20+
ng-show="(hasError() && errorMessage(schemaError())) || form.description"
21+
ng-bind-html="(hasError() && errorMessage(schemaError())) || form.description"></div>
1622
</div>

0 commit comments

Comments
 (0)