def post_helper(form_tag=True, edit_mode=False):
    """
    Post's form layout helper
    """
    helper = FormHelper()
    helper.form_action = '.'
    helper.attrs = {'data_abide': ''}
    helper.form_tag = form_tag
    
    fieldsets = [
        Row(
            Column(
                'text',
                css_class='small-12'
            ),
        ),
    ]
    
    # Threadwatch option is not in edit form
    if not edit_mode:
        fieldsets.append(
            Row(
                Column(
                    'threadwatch',
                    css_class='small-12'
                ),
            ),
        )
    
    fieldsets = fieldsets+[
        ButtonHolderPanel(
            Submit('submit', _('Submit')),
            css_class='text-right',
        ),
    ]
    
    helper.layout = Layout(*fieldsets)
    
    return helper
def post_helper ( form_tag = True , edit_mode = False ) : helper = FormHelper ( ) helper . form_action = '.' helper . attrs = { 'data_abide' : '' } helper . form_tag = form_tag fieldsets = [ Row ( Column ( 'text' , css_class = 'small-12' ) , ) , ] if not edit_mode : fieldsets . append ( Row ( Column ( 'threadwatch' , css_class = 'small-12' ) , ) , ) fieldsets = fieldsets + [ ButtonHolderPanel ( Submit ( 'submit' , _ ( 'Submit' ) ) , css_class = 'text-right' , ) , ] helper . layout = Layout ( * fieldsets ) return helper
Post's form layout helper