2017 © Pedro Peláez
 

library imageslave

Form extension & Image thumbs solution for Nette framework

image

studioartcz/imageslave

Form extension & Image thumbs solution for Nette framework

  • Tuesday, September 20, 2016
  • by landsman
  • Repository
  • 2 Watchers
  • 2 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 1 Versions
  • 50 % Grown

The README.md

ImageSlave

Nette plugin: Form extension for upload picture (JPG, PNG, SVG, ..) with thumbnail preview & lightbox original. Front-end solution for thumbnails., (*1)

Example in form:, (*2)

Preview, (*3)

How install actual version

Add via composer to your project:, (*4)

$ composer require studioartcz/imageslave @dev

Add to extensions in your config.neon (for advanced setup see doc), (*5)

extensions:
    imageslave: App\Form\Control\ImageSlaveExtension

For lightbox preview download client-side assets via bower:, (*6)

$ cd {fill-your-path}/vendors/studioartcz/imageslave/
$ bower install

Add rules to Grunt - example and add your copied JS with files from client-side folder., (*7)

Using in Forms

Create form:, (*8)

public function create()
{
    $form = new Form();
    $form->addImageSlave("picture", "Pretty picture");
    $form->onSuccess[] = array($this, "processForm");
    return $form;
}

Working with data:, (*9)

public function processForm(Form $form, $values)
{
    var_dump($values->picture);
}

The Versions

20/09 2016

dev-master

9999999-dev https://github.com/studioartcz/imageslave

Form extension & Image thumbs solution for Nette framework

  Sources   Download

MIT

The Requires