Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Header subtype fix #136

Merged
merged 2 commits into from
Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- v1.9.27 - Bugfix: Header subtypes [#136](https://github.com/kevinchappell/formBuilder/pull/136)
- v1.9.26 - Bugfix: saved subtypes not rendering [#134](https://github.com/kevinchappell/formBuilder/pull/134)
- v1.9.25 - Bugfix: Standardizes how field variables are processed from xml, defaultfields and new field sources [#129](https://github.com/kevinchappell/formBuilder/pull/129)
- v1.9.24 - Bugfix: Update internal field id to better handle multiple editors [#126](https://github.com/kevinchappell/formBuilder/pull/126)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
formBuilder v1.9.26
formBuilder v1.9.27
===========

[![Join the chat at https://gitter.im/kevinchappell/formBuilder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kevinchappell/formBuilder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formBuilder",
"version": "1.9.26",
"version": "1.9.27",
"main": [
"dist/*"
],
Expand Down
2 changes: 1 addition & 1 deletion demo/assets/css/form-builder.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
formBuilder - http://kevinchappell.github.io/formBuilder/
Version: 1.9.26
Version: 1.9.27
Author: Kevin Chappell <[email protected]>
*/
@charset "UTF-8";
Expand Down
2 changes: 1 addition & 1 deletion demo/assets/css/form-builder.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/assets/css/form-render.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
formBuilder - http://kevinchappell.github.io/formBuilder/
Version: 1.9.26
Version: 1.9.27
Author: Kevin Chappell <[email protected]>
*/
* {
Expand Down
2 changes: 1 addition & 1 deletion demo/assets/css/form-render.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/assets/css/site.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions demo/assets/js/form-builder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
formBuilder - http://kevinchappell.github.io/formBuilder/
Version: 1.9.26
Version: 1.9.27
Author: Kevin Chappell <[email protected]>
*/
'use strict';
Expand Down Expand Up @@ -1857,21 +1857,23 @@ function formBuilderEventsFn() {
*/
var subTypeField = function subTypeField(values) {
var subTypes = opts.messages.subtypes,
type = values.subtype || values.type,
subType = '';
type = values.type,
subtype = values.subtype || '',
subTypeField = '',
selected = void 0;

if (subTypes[type]) {
var subTypeLabel = '<label>' + opts.messages.subtype + '</label>';
subType += '<select name="subtype" class="fld-subtype form-control" id="subtype-' + lastID + '">';
subTypeField += '<select name="subtype" class="fld-subtype form-control" id="subtype-' + lastID + '">';
subTypes[type].forEach(function (element) {
var selected = type === element ? 'selected' : '';
subType += '<option value="' + element + '" ' + selected + '>' + element + '</option>';
selected = subtype === element ? 'selected' : '';
subTypeField += '<option value="' + element + '" ' + selected + '>' + element + '</option>';
});
subType += '</select>';
subType = '<div class="form-group subtype-wrap">' + subTypeLabel + ' ' + subType + '</div>';
subTypeField += '</select>';
subTypeField = '<div class="form-group subtype-wrap">' + subTypeLabel + ' ' + subTypeField + '</div>';
}

return subType;
return subTypeField;
};

var btnStyles = function btnStyles(style, type) {
Expand Down
6 changes: 3 additions & 3 deletions demo/assets/js/form-builder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/assets/js/form-render.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
formBuilder - http://kevinchappell.github.io/formBuilder/
Version: 1.9.26
Version: 1.9.27
Author: Kevin Chappell <[email protected]>
*/
'use strict';
Expand Down
Loading