2017 © Pedro Peláez
 

library nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

image

valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  • Saturday, February 17, 2018
  • by Valicek1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,263 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Bootstrap / Zurb Foundation forms for Nette Framework

Originally forked from foglcz/nestraps, (*1)

Installation

$ composer require valicek1/nestraps

How to use in nette

Update your config.neon:, (*2)

    factories:
        form:
            parameters: [type]
            class: \Nette\Application\UI\Form
            setup:
                - setRenderer(\foglcz\Nestraps(%type%, @latte.templateFactory))

And then in your presenter:, (*3)

public function createComponentYourFormName($name) {
    $form = $this->getContext()->createForm(\foglcz\Nestraps::BOOTSTRAP);
    $form = $this->getContext()->createForm(\foglcz\Nestraps::FOUNDATION);
    // ...
}

What is it

Nestraps is a replacement for conventional renderer in Nette Framework. Basically, all it does is that it takes given .latte file & sends the form there., (*4)

The .latte file can be written in any way - how you want it., (*5)

Twitter Bootstrap style

Detailed documentation is pending; for now proceed to HomepagePresenter in showcase: https://github.com/foglcz/nestraps/blob/master/showcase/nette-2.0/app/presenters/HomepagePresenter.php, (*6)

OVERLOADING:

Don't really worry about manually editing this file -- altough it's possible, much cleaner approach is to create your own template with following markup:, (*7)

  {layout 'path/to/bootstrap.latte'}
  {define #TextInput}<insert text input markup here>{/define}

If you want to overload some field but not overload the input globally, use following:, (*8)

$field->setOption('latte', 'path/to/your/overloaded.latte');, (*9)

... or:, (*10)

$field->setOption('blockname', 'nameOfYourDefineBlockWithoutHash');, (*11)

NOTE:

In the template, the hidden fields are rendered as last. The easiest way to extend any field is:, (*12)

$form->addHidden(...)->setOption('latte', 'path/to/your/field.latte'), (*13)

License

LGPL., (*14)

The Versions

17/02 2018

dev-master

9999999-dev http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL LGPL-2.0-or-later

The Requires

 

bootstrap forms nette

10/09 2017

v1.1.6

1.1.6.0 http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

06/04 2017

v1.1.5

1.1.5.0 http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

29/07 2016

v1.1.4

1.1.4.0 http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

28/07 2016

v1.1.2

1.1.2.0 http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

28/07 2016

v1.1.0

1.1.0.0 http://github.com/Valicek1/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

16/08 2012

v1.0.1

1.0.1.0 http://github.com/foglcz/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette

27/07 2012

v1.0.0

1.0.0.0 http://github.com/foglcz/nestraps

Nestraps - Twitter bootstrap renderer for Nette Framework (without assets)

  Sources   Download

LGPL

The Requires

 

bootstrap forms nette