Skip to content

Commit

Permalink
Bugfix: block elements attributes missing (#159)
Browse files Browse the repository at this point in the history
* Bugfix: block elements attributes missing, Resolves #158

* version bump
  • Loading branch information
kevinchappell committed Jun 2, 2016
1 parent 426bbcb commit 9ac98f7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions assets/css/form-builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,7 @@ ol.sortable-options {
width: 100%;
height: 100%; }

.kc-toggle
.kct-on {
.kc-toggle .kct-on {
color: #12a912; }

.kct-off {
Expand Down
5 changes: 3 additions & 2 deletions assets/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ function formBuilderHelpersFn(opts, formBuilder) {
var i,
preview = '',
epoch = new Date().getTime();
attrs = Object.assign({}, attrs);
attrs = jQuery.extend({}, attrs);
attrs.type = attrs.subtype || attrs.type;
var toggle = attrs.toggle ? 'toggle' : '';
// attrs = _helpers.escapeAttrs(attrs);
Expand Down Expand Up @@ -644,7 +644,8 @@ function formBuilderHelpersFn(opts, formBuilder) {
preview = '<input class="ui-autocomplete-input ' + attrs.className + '" autocomplete="on">';
break;
default:
preview = '<' + attrs.type + '>' + attrs.label + '</' + attrs.type + '>';
attrsString = _helpers.attrString(attrs);
preview = '<' + attrs.type + ' ' + attrsString + '>' + attrs.label + '</' + attrs.type + '>';
}

return preview;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/form-builder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/form-render.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function FormRenderFn(options, element) {
}
break;
default:
fieldMarkup = '<' + fieldAttrs.type + '>' + fieldLabelText + '</' + fieldAttrs.type + '>';
fieldMarkup = '<' + fieldAttrs.type + ' ' + fieldAttrsString + '>' + fieldLabelVal + '</' + fieldAttrs.type + '>';
}

if (fieldAttrs.type !== 'hidden') {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/form-render.min.js

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

2 changes: 1 addition & 1 deletion assets/js/form-render.min.js.map

Large diffs are not rendered by default.

0 comments on commit 9ac98f7

Please sign in to comment.