Skip to content

Commit

Permalink
Required checkbox fix, form-horizontal css alignment fix (#422)
Browse files Browse the repository at this point in the history
* Fix horizontal-form alignment issue

* fix required being checked in editor when it is set to false
  • Loading branch information
kevinchappell authored Apr 20, 2017
1 parent f63d227 commit 74b1cb2
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion demo/assets/css/form-builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ textarea.form-control {
.frmb .prev-holder {
display: block; }
.frmb .prev-holder .form-group {
margin-bottom: 0; }
margin: 0; }
.frmb .prev-holder .ql-editor {
min-height: 125px; }
.frmb .prev-holder .form-group > label:not([class='fb-checkbox-label']) {
Expand Down
2 changes: 1 addition & 1 deletion demo/assets/css/form-builder.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demo/assets/js/form-builder.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demo/assets/js/form-builder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/form-builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ textarea.form-control {
.frmb .prev-holder {
display: block; }
.frmb .prev-holder .form-group {
margin-bottom: 0; }
margin: 0; }
.frmb .prev-holder .ql-editor {
min-height: 125px; }
.frmb .prev-holder .form-group > label:not([class='fb-checkbox-label']) {
Expand Down
4 changes: 2 additions & 2 deletions dist/form-builder.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/form-builder.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/form-builder.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ const FormBuilder = function(opts, element) {
let label = (txt) => {
return `<label for="${name}-${data.lastID}">${txt}</label>`;
};
let checked = (values[name] !== undefined ? 'checked' : '');
let checked = (values[name] ? 'checked' : '');
let input = `<input type="checkbox" class="fld-${name}" name="${name}" value="true" ${checked} id="${name}-${data.lastID}"/> `;
let left = [];
let right = [
Expand Down
2 changes: 1 addition & 1 deletion src/sass/_stage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
display: block;

.form-group {
margin-bottom: 0;
margin: 0;
}

.ql-editor {
Expand Down

0 comments on commit 74b1cb2

Please sign in to comment.