2017 © Pedro Peláez
 

yii2-extension yii2-file-input-widget

Jasny file input widget for the Yii framework

image

2amigos/yii2-file-input-widget

Jasny file input widget for the Yii framework

  • Friday, June 30, 2017
  • by tonydspaniard
  • Repository
  • 15 Watchers
  • 21 Stars
  • 14,695 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 22 Forks
  • 2 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

FileInput Widget for Yii2

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

This widget allows to make use of the great File Input Plugin that Arnold Daniels developed to enhance our Bootstrap experience., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

$ composer require 2amigos/yii2-file-input-widget:~1.0

or add, (*5)

"2amigos/yii2-file-input-widget": "~1.0"

to the require section of your composer.json file., (*6)

Then, Add to your configuration file, the following to your components section:, (*7)

'i18n' => [
      'translations' => [
          'file-input*' => [
              'class' => 'yii\i18n\PhpMessageSource',
              'basePath' => dirname(__FILE__).'/../vendor/2amigos/yii2-file-input-widget/src/messages/',
          ],
      ],
  ],

If a translation is missing, feel free to make a PR and I will merge it., (*8)

Usage

Using a model:, (*9)

use dosamigos\fileinput\FileInput;

=FileInput::widget([
    'model' => $model,
    'attribute' => 'image', // image is the attribute
    // using STYLE_IMAGE allows me to display an image. Cool to display previously
    // uploaded images
    'thumbnail' => $model->getAvatarImage(),
    'style' => FileInput::STYLE_IMAGE
]);?>

Update

We have included the improved and multiple file upload version from Krajee., (*10)


= $form->field($model, 'code')->widget(\dosamigos\fileinput\BootstrapFileInput::className(), [ 'options' => ['accept' => 'image/*', 'multiple' => true], 'clientOptions' => [ 'previewFileType' => 'text', 'browseClass' => 'btn btn-success', 'uploadClass' => 'btn btn-info', 'removeClass' => 'btn btn-danger', 'removeIcon' => ' ' ] ]);?>

For further information regarding Krajee's version, please visit its site., (*11)

Testing

$ ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details., (*12)

Credits

License

The BSD License (BSD). Please see License File for more information., (*13)


web development has never been so fun
www.2amigos.us

The Versions

30/06 2017

dev-master

9999999-dev https://github.com/2amigos//yii2-file-input-widget

Jasny file input widget for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 2amigos yii yii 2 widget file input

13/02 2016

1.0.2

1.0.2.0 https://github.com/2amigos//yii2-file-input-widget

Jasny file input widget for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 2amigos yii yii 2 widget file input

13/02 2016

1.0.1

1.0.1.0 https://github.com/2amigos//yii2-file-input-widget

Jasny file input widget for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

yii2 2amigos yii yii 2 widget file input

13/04 2015

1.0.0

1.0.0.0 https://github.com/2amigos//yii2-file-input-widget

Jasny file input widget for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alexander Kochetov

yii2 2amigos yii yii 2 widget file input

23/05 2014

0.1.2

0.1.2.0

Jasny File Input Bootstrap widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget file input

19/05 2014

0.1.1

0.1.1.0

Jasny File Input Bootstrap widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget file input

09/04 2014

0.1.0

0.1.0.0

Jasny File Input Bootstrap widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget file input