mixin display_boolean(name, value, handler, help_text)
  .switch
    - if (handler)
      input(type='hidden', name=name, value='0')
      input(type='checkbox', id='s_' + name, value='1', name=name, checked=value, data-on-change=handler)
    - else
      input(type='hidden', name=name, value='0')
      input(type='checkbox', id='s_' + name, value='1', name=name, checked=value)
    label(for='s_' + name, data-yes=self.t('admin.phrases.yes'), data-no=self.t('admin.phrases.no')): i

  - if (help_text)
    span.help-block #{help_text}

mixin display_boolean(name, value, handler, help_text)
  - console.log(value);

  //- type cast value
  - if (value === '0' || value === 'false')
    - value = null
  
  .switch
    - if (handler)
      input(type='hidden', name=name, value='0')
      input(type='checkbox', id='s_' + name, value='1', name=name, checked=value, data-on-change=handler)
    - else
      input(type='hidden', name=name, value='0')
      input(type='checkbox', id='s_' + name, value='1', name=name, checked=value)
    label(for='s_' + name, data-yes=self.t('admin.phrases.yes'), data-no=self.t('admin.phrases.no')): i

  - if (help_text)
    span.help-block #{help_text}

Add type casting to boolean settings partial
Add type casting to boolean settings partial
