Skip to content

Commit

Permalink
Merge pull request #989 from lsmith77/submit-boolean-as-json-boolean
Browse files Browse the repository at this point in the history
ensure that boolean fields are submited as boolean values when using json
  • Loading branch information
lsmith77 committed Apr 28, 2017
2 parents 572c69a + e5268e3 commit ae18441
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Resources/views/layout.html.twig
Expand Up @@ -517,6 +517,11 @@
value = $('.value', $(this)).val();
if (value) {
// convert boolean values to boolean
if ('json' === bodyFormat && 'boolean' === $('.tuple_type', $(this)).val()) {
value = '1' === value;
}
// temporary save all additional/doubled parameters
if (key in params) {
doubledParams[key] = value;
Expand Down

0 comments on commit ae18441

Please sign in to comment.