Skip to content

Add support of pair latte macro "button" for render form control SubmitButton as <button>. It can be useful for Twitter bootstrap design.

Notifications You must be signed in to change notification settings

zeleznypa/nette-button-macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

#nette-button-macros (cc)# Pavel Železný (2bfree), 2013 (pavelzelezny.cz)

Requirements

Nette Framework 2.0.7 or higher. PHP 5.3 edition

Documentation

Add support of pair latte macro "button" for render form control SubmitButton as . It can be useful for Twitter bootstrap design.

Instalation

Prefered way to intall is by Composer

{
	"require":{
		"zeleznypa/nette-button-macros": "dev-master"
	}
}

Setup

Add following code into neon.conf

latte:
	macros:
		- \Zeleznypa\Nette\Latte\Macros\FormMacros::install

Usage

In latte template you can use following code

{form formName}
	{button controlName class=>"btn"}
		<i class="icon icon-ok"></i>
		{caption}
	{/button}
{/form}

Also you can use object instead the control name

{form formName}
	{button $_form['controlName'] class=>"btn"}
		<i class="icon icon-ok"></i>
		{caption}
	{/button}
{/form}

About

Add support of pair latte macro "button" for render form control SubmitButton as <button>. It can be useful for Twitter bootstrap design.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages