Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit a4de416

Browse files
authored
Merge pull request #19 from citizennet/dev
Fix: API-2709 & API-2748
2 parents b36cbb5 + 3ea2234 commit a4de416

7 files changed

Lines changed: 76 additions & 6 deletions

File tree

dist/bootstrap-decorator.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootstrap-decorator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/schema-form.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,9 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
17291729
// We create copies of the form on demand, caching them for
17301730
// later requests
17311731
scope.copyWithIndex = function(index) {
1732+
if (!formDefCache) {
1733+
formDefCache = [];
1734+
}
17321735
if (!formDefCache[index]) {
17331736
if (subForm) {
17341737
var copy = angular.copy(subForm);

dist/schema-form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/directives/array.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
112112
// We create copies of the form on demand, caching them for
113113
// later requests
114114
scope.copyWithIndex = function(index) {
115+
if (!formDefCache) {
116+
formDefCache = [];
117+
}
115118
if (!formDefCache[index]) {
116119
if (subForm) {
117120
var copy = angular.copy(subForm);

src/directives/decorators/bootstrap/bootstrap-decorator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ angular.module('schemaForm').config(['schemaFormDecoratorsProvider', function(de
1414
select: {template: base + 'select.html', replace: false},
1515
checkbox: {template: base + 'checkbox.html', replace: false},
1616
checkboxes: {template: base + 'checkboxes.html', replace: false},
17-
number: {template: base + 'default.html', replace: false},
17+
number: {template: base + 'number.html', replace: false},
1818
password: {template: base + 'default.html', replace: false},
1919
submit: {template: base + 'submit.html', replace: false},
2020
button: {template: base + 'submit.html', replace: false},
@@ -32,7 +32,7 @@ angular.module('schemaForm').config(['schemaFormDecoratorsProvider', function(de
3232
select: base + 'select.html',
3333
checkbox: base + 'checkbox.html',
3434
checkboxes: base + 'checkboxes.html',
35-
number: base + 'default.html',
35+
number: base + 'number.html',
3636
submit: base + 'submit.html',
3737
button: base + 'submit.html',
3838
text: base + 'default.html',
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<div class="form-group schema-form-{{form.type}} {{form.htmlClass}}"
2+
ng-class="{'has-error': form.disableErrorState !== true && hasError(), 'has-success': form.disableSuccessState !== true && hasSuccess(), 'has-feedback': form.feedback !== false }">
3+
<label class="control-label {{form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label>
4+
5+
<input ng-if="!form.fieldAddonLeft && !form.fieldAddonRight"
6+
ng-show="form.key"
7+
type="number"
8+
cn-ignore-wheel
9+
step="any"
10+
sf-changed="form"
11+
placeholder="{{form.placeholder}}"
12+
class="form-control {{form.fieldHtmlClass}}"
13+
id="{{form.key.slice(-1)[0]}}"
14+
ng-model-options="form.ngModelOptions"
15+
ng-model="$$value$$"
16+
ng-pattern="{{form.pattern}}"
17+
ng-disabled="form.readonly"
18+
schema-validate="form"
19+
ng-trim="{{!form.noTrim}}"
20+
name="{{form.key.slice(-1)[0]}}"
21+
max="{{form.schema.max}}"
22+
min="{{form.schema.min}}"
23+
aria-describedby="{{form.key.slice(-1)[0] + 'Status'}}">
24+
25+
<div ng-if="form.fieldAddonLeft || form.fieldAddonRight"
26+
ng-class="{'input-group': (form.fieldAddonLeft || form.fieldAddonRight)}">
27+
<span ng-if="form.fieldAddonLeft"
28+
class="input-group-addon"
29+
ng-bind-html="form.fieldAddonLeft"></span>
30+
<input ng-show="form.key"
31+
type="number"
32+
cn-ignore-wheel
33+
step="any"
34+
sf-changed="form"
35+
placeholder="{{form.placeholder}}"
36+
class="form-control {{form.fieldHtmlClass}}"
37+
id="{{form.key.slice(-1)[0]}}"
38+
ng-model-options="form.ngModelOptions"
39+
ng-model="$$value$$"
40+
ng-pattern="{{form.pattern}}"
41+
ng-disabled="form.readonly"
42+
schema-validate="form"
43+
name="{{form.key.slice(-1)[0]}}"
44+
max="{{form.schema.max}}"
45+
min="{{form.schema.min}}"
46+
aria-describedby="{{form.key.slice(-1)[0] + 'Status'}}">
47+
48+
<span ng-if="form.fieldAddonRight"
49+
class="input-group-addon"
50+
ng-bind-html="form.fieldAddonRight"></span>
51+
</div>
52+
53+
<span ng-if="form.feedback !== false"
54+
class="form-control-feedback"
55+
ng-class="evalInScope(form.feedback) || {'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"
56+
aria-hidden="true"></span>
57+
58+
<span ng-if="hasError() || hasSuccess()"
59+
id="{{form.key.slice(-1)[0] + 'Status'}}"
60+
class="sr-only">{{ hasSuccess() ? '(success)' : '(error)' }}</span>
61+
62+
<div class="help-block" sf-message="form.description"></div>
63+
</div>

0 commit comments

Comments
 (0)