def inject_enable(output):
 if ('form' in output):
  id = 'layer_enable'
  label = LABEL(('%s:' % T('Enable in Default Config?')), _for='enable')
  widget = INPUT(_name='enable', _type='checkbox', _value='on', _id='layer_enable', _class='boolean')
  comment = ''
  if (s3_formstyle == 'bootstrap'):
   _controls = DIV(widget, comment, _class='controls')
   row = DIV(label, _controls, _class='control-group', _id=('%s__row' % id))
  elif callable(s3_formstyle):
   row = s3_formstyle(id, label, widget, comment)
  else:
   raise
  output['form'][0][(-2)].append(row)

def inject_enable ( output ) : if ( 'form' in output ) : id = 'layer_enable' label = LABEL ( ( '%s:' % T ( 'Enable in Default Config?' ) ) , _for = 'enable' ) widget = INPUT ( _name = 'enable' , _type = 'checkbox' , _value = 'on' , _id = 'layer_enable' , _class = 'boolean' ) comment = '' if ( s3_formstyle == 'bootstrap' ) : _controls = DIV ( widget , comment , _class = 'controls' ) row = DIV ( label , _controls , _class = 'control-group' , _id = ( '%s__row' % id ) ) elif callable ( s3_formstyle ) : row = s3_formstyle ( id , label , widget , comment ) else : raise output [ 'form' ] [ 0 ] [ ( - 2 ) ] . append ( row )
inject an enable in default config? checkbox into the form .