x-editable ( http://vitalets.github.io/x-editable/ ) symfony2 forms integration
-
Add IbrowsXeditableBundle in your composer.json:
{ "require": { "ibrows/xeditable-bundle": "~1.0", } }
-
Now tell composer to download the bundle by running the command:
$ php composer.phar update ibrows/xeditable-bundle
Composer will install the bundle to your project's
ibrows/xeditable-bundle
directory. ( PSR-4 ) -
Add the bundles to your
AppKernel
class// app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new Ibrows\XeditableBundle\IbrowsXeditableBundle(), // ... ); // ... }
-
Include JS-Lib and CSS Files
{% javascripts '@IbrowsXeditableBundle/Resources/public/javascript/bootstrap.editable-1.5.1.js' '@IbrowsXeditableBundle/Resources/public/javascript/xeditable.js' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
{% stylesheets 'bundles/ibrowsxeditable/css/bootstrap-editable.css' %} <link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}" /> {% endstylesheets %}