def buttons_crispies(): return [ Row( Column(ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Button('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix'), ), Row( Column( Panel(ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Button('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix')), ), ]
def buttons_crispies(pack=None): box = Panel if pack == 'foundation-6': box = Callout return [ Row( Column(ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Reset('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix'), ), Row( Column( box(HTML("""<p>As <input/></p>"""), ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Reset('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix')), ), Row( Column( box(HTML("""<p>As <button/></p>"""), ButtonGroup(ButtonSubmit('submit', _('Submit'), css_class='success'), ButtonReset('cancel', _('Cancel')), ButtonElement( 'button-label', 'button-value', css_class='alert', content="""<span><Doh/></span>"""), css_class='radius right'), css_class='clearfix')), ), ]
def buttons_crispies(pack=None): box = Panel if pack == 'foundation-6': box = Callout return [ Row( Column(ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Button('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix'), ), Row( Column( box(ButtonGroup(Submit('submit', _('Submit'), css_class='success'), Button('cancel', _('Cancel')), Button('dummy', _('Delete'), css_class='alert'), css_class='radius right'), css_class='clearfix')), ), ]
def test_buttongroup(output_test_path, rendered_template, helper, client): form = BasicInputForm() pack = helper.template_pack helper.layout = Layout( 'simple', ButtonGroup( Submit('Save', 'Save'), Button('Cancel', 'Cancel'), ) ) rendered = rendered_template(form, helper=helper) attempted = read_output(output_test_path, pack, "test_buttongroup.html") #write_output(output_test_path, pack, "test_buttongroup.html", rendered) assert rendered == attempted