app/assets/javascripts/formagic/inputs/checkbox.coffee in formagic-0.3.7 vs app/assets/javascripts/formagic/inputs/checkbox.coffee in formagic-0.3.8

- old
+ new

@@ -35,33 +35,12 @@ # PUBLIC ==================================================================== updateValue: (@value) -> @$input.prop('checked', @_safe_value()) + @$input.trigger('change') hash: (hash={}) -> hash[@config.klassName] = @$input.prop('checked') return hash chr.formInputs['checkbox'] = InputCheckbox - -# ----------------------------------------------------------------------------- -# INPUT CHECKBOX SWITCH -# ----------------------------------------------------------------------------- -class @InputCheckboxSwitch extends InputCheckbox - - # PRIVATE =================================================================== - - _add_input: -> - @$switch =$ "<div class='switch'>" - @$el.append @$switch - - @$false_hidden_input =$ "<input type='hidden' name='#{ @name }' value='false' />" - @$switch.append @$false_hidden_input - - @$input =$ "<input type='checkbox' id='#{ @name }' name='#{ @name }' value='true' #{ if @_safe_value() then 'checked' else '' } />" - @$switch.append @$input - - @$checkbox =$ "<div class='checkbox'>" - @$switch.append @$checkbox - -chr.formInputs['switch'] = InputCheckboxSwitch