-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to remove limit on roles (#175)
* Refactor to remove limit on roles * bump
- Loading branch information
1 parent
7ff1a64
commit 0aedc76
Showing
9 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
formBuilder - http://kevinchappell.github.io/formBuilder/ | ||
Version: 1.10.1 | ||
Version: 1.10.2 | ||
Author: Kevin Chappell <[email protected]> | ||
*/ | ||
@charset "UTF-8"; | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
formBuilder - http://kevinchappell.github.io/formBuilder/ | ||
Version: 1.10.1 | ||
Version: 1.10.2 | ||
Author: Kevin Chappell <[email protected]> | ||
*/ | ||
* { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
formBuilder - http://kevinchappell.github.io/formBuilder/ | ||
Version: 1.10.1 | ||
Version: 1.10.2 | ||
Author: Kevin Chappell <[email protected]> | ||
*/ | ||
'use strict'; | ||
|
@@ -1823,6 +1823,7 @@ function formBuilderEventsFn() { | |
var advFields = function advFields(values) { | ||
var advFields = [], | ||
key, | ||
checked = '', | ||
roles = values.role !== undefined ? values.role.split(',') : []; | ||
|
||
// var fieldLabelLabel = _helpers.markup('label', opts.messages.label); | ||
|
@@ -1861,10 +1862,12 @@ function formBuilderEventsFn() { | |
advFields.push('<div class="available-roles" ' + (values.role !== undefined ? 'style="display:block"' : '') + '>'); | ||
|
||
for (key in opts.roles) { | ||
if ($.inArray(key, ['date', '4']) === -1) { | ||
advFields.push('<input type="checkbox" name="roles[]" value="' + key + '" id="fld-' + lastID + '-roles-' + key + '" ' + ($.inArray(key, roles) !== -1 ? 'checked' : '') + ' class="roles-field" /><label for="fld-' + lastID + '-roles-' + key + '">' + opts.roles[key] + '</label><br/>'); | ||
if (opts.roles.hasOwnProperty(key)) { | ||
checked = _helpers.inArray(key, roles) ? 'checked' : ''; | ||
advFields.push('<input type="checkbox" name="roles[]" value="' + key + '" id="fld-' + lastID + '-roles-' + key + '" ' + checked + ' class="roles-field" /><label for="fld-' + lastID + '-roles-' + key + '">' + opts.roles[key] + '</label><br/>'); | ||
} | ||
} | ||
|
||
advFields.push('</div></div>'); | ||
|
||
if (values.type === 'checkbox-group' || values.type === 'radio-group') { | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
formBuilder - http://kevinchappell.github.io/formBuilder/ | ||
Version: 1.10.1 | ||
Version: 1.10.2 | ||
Author: Kevin Chappell <[email protected]> | ||
*/ | ||
'use strict'; | ||
|
Oops, something went wrong.