{"id":15169503,"url":"https://github.com/2amigos/yii2-editable-widget","last_synced_at":"2025-10-01T02:31:24.666Z","repository":{"id":15711011,"uuid":"18449024","full_name":"2amigos/yii2-editable-widget","owner":"2amigos","description":"X-Editable Widget for Yii2","archived":true,"fork":false,"pushed_at":"2022-08-21T14:10:15.000Z","size":420,"stargazers_count":58,"open_issues_count":10,"forks_count":20,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-09-22T22:01:58.758Z","etag":null,"topics":["php","widget","x-editable","yii"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2amigos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-04T18:56:28.000Z","updated_at":"2023-07-27T14:25:38.000Z","dependencies_parsed_at":"2022-09-01T05:12:47.840Z","dependency_job_id":null,"html_url":"https://github.com/2amigos/yii2-editable-widget","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2amigos%2Fyii2-editable-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2amigos%2Fyii2-editable-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2amigos%2Fyii2-editable-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2amigos%2Fyii2-editable-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2amigos","download_url":"https://codeload.github.com/2amigos/yii2-editable-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875269,"owners_count":16554660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","widget","x-editable","yii"],"created_at":"2024-09-27T07:02:41.040Z","updated_at":"2025-10-01T02:31:19.334Z","avatar_url":"https://github.com/2amigos.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"X-Editable Widget for Yii2\n==========================\n\n[![Latest Version](https://img.shields.io/github/tag/2amigos/yii2-editable-widget.svg?style=flat-square\u0026label=release)](https://github.com/2amigos/yii2-editable-widget/tags)\n[![Software License](https://img.shields.io/badge/license-BSD-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/2amigos/yii2-editable-widget/master.svg?style=flat-square)](https://travis-ci.org/2amigos/yii2-editable-widget)\n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/2amigos/yii2-editable-widget.svg?style=flat-square)](https://scrutinizer-ci.com/g/2amigos/yii2-editable-widget/code-structure)\n[![Quality Score](https://img.shields.io/scrutinizer/g/2amigos/yii2-editable-widget.svg?style=flat-square)](https://scrutinizer-ci.com/g/2amigos/yii2-editable-widget)\n[![Total Downloads](https://img.shields.io/packagist/dt/2amigos/yii2-editable-widget.svg?style=flat-square)](https://packagist.org/packages/2amigos/yii2-editable-widget)\n\nRenders a [X-Editable Input](http://vitalets.github.io/x-editable/index.html) allowing to use the amazing inline capabilities of [X-Editable Plugin](http://vitalets.github.io/x-editable/index.html). \n\nImportant Note\n--------------\nWe decided to port only the Bootstrap 3 capabilities of [X-Editable Plugin](http://vitalets.github.io/x-editable/index.html) due to the requirements of our projects. We have done quite a lot of work: \n\n- The original library has been modified to port it to Yii2. Plugins that we thought didn't belong to the core, we extracted them and implemented them as separated external input types (address, combodate, datepicker, datetimepicker, select2 and wysihtml5 plugins). We thought that separating external types will help everybody to isolate problems and be able to improve the library much better.\n- Plugins have been all updated to their latest versions \n- Fixed datepicker and datetimepicker types to work with Bootstrap 3 \n- Refactored widget code to make it easier to understand\n- We have not included **EditableColumn**, **EditableListView**, or **EditableDetailView** because we believe they correspond to a different package. They will be developed independently. \n\nSo, if you have issues to fix, please remember, **THIS IS NOT** an exact copy of X-Editable, this is a Bootstrap 3 enhanced X-Editable plugin ported to Yii2. \n\nWe welcome everybody to improve this library with their amazing Pull Requests :) and we hope that this will increase the productivity of your Yii2 experience.\n\nSo keep this in mind: \n\n- Widget is based on [X-Editable](http://vitalets.github.io/x-editable/) not on [X-Editable for Yii](http://x-editable.demopage.ru/)\n- It does not work with JQuery UI or as plain JQuery, just Bootstrap and latest version only (not 2.3.2 sorry)\n- If you wish to help improve the library do it, but do not update the library thinking this is the same as X-Editable source, it has been modified. \n- The supported types are:\n    - text \n    - textarea \n    - select \n    - date \n    - datetime \n    - combodate \n    - html5 types \n    - checklist \n    - wysihtml5\n    - select2 \n    - No typeaheadJs - ready for the challenge?\n\n\nInstallation\n------------\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\ncomposer require 2amigos/yii2-editable-widget:~1.0\n```\nor add\n\n```json\n\"2amigos/yii2-editable-widget\" : \"~1.0\"\n```\n\nto the require section of your application's `composer.json` file.\n\n\nUsage\n-----\nThere is an amazing site made by [Vitaliy Potapov](https://github.com/vitalets) which shows how to configure the widget. We are not going to explain how to use each one of the again and we encourage you to visit [the documentation section of the plugin's site](http://vitalets.github.io/x-editable/docs.html)\n\n```\n\u003c?php\nuse dosamigos\\editable\\Editable;\n\n// as a widget with a model and a datetime type\n?\u003e\n\n\u003c?= Editable::widget( [\n    'model' =\u003e $model,\n    'attribute' =\u003e 'created_at',\n    'url' =\u003e 'site/test',\n    'type' =\u003e 'datetime',\n    'mode' =\u003e 'pop',\n    'clientOptions' =\u003e [\n        'placement' =\u003e 'right',\n        'format' =\u003e 'yyyy-mm-dd hh:ii',\n        'viewformat' =\u003e 'dd/mm/yyyy hh:ii',\n        'datetimepicker' =\u003e [\n            'orientation' =\u003e 'top auto'\n           ]\n    ]\n]);?\u003e\n\u003c?php \n\n// as a widget without a model and a select2 type\n?\u003e\n\u003c?= Editable::widget( [\n    'name' =\u003e 'country_code',\n    'value' =\u003e '',\n    'url' =\u003e 'site/test',\n    'type' =\u003e 'select2',\n    'mode' =\u003e 'pop',\n    'clientOptions' =\u003e [\n        'pk' =\u003e 2,\n        'placement' =\u003e 'right',\n        'select2' =\u003e [\n            'width' =\u003e '124px'\n        ],\n        'source' =\u003e [\n            ['id' =\u003e 'gb', 'text' =\u003e 'Great Britain'],\n            ['id' =\u003e 'es', 'text' =\u003e 'Spain'],\n        ],\n    ]\n]);?\u003e\n\n\u003c?php \n// with an ActiveForm instance displayed as a address input \n\nuse dosamigos\\editable\\Editable;\n?\u003e\n\u003c?= $form-\u003efield($model, 'address')-\u003ewidget(Editable::className(), [\n    'url' =\u003e 'site/test',\n    'type' =\u003e 'address'\n]);?\u003e\n\n\u003c?php \n// as datetime type input\n\u003c?= $form-\u003efield($model, 'created_at')-\u003ewidget(Editable::className(), [\n    'url' =\u003e 'site/test',\n    'type' =\u003e 'datetime',\n    'mode' =\u003e 'pop',\n    'clientOptions' =\u003e [\n        'placement' =\u003e 'right',\n        'format' =\u003e 'yyyy-mm-dd hh:ii',\n        'viewformat' =\u003e 'dd/mm/yyyy hh:ii',\n        'datepicker' =\u003e [\n            'orientation' =\u003e 'top auto'\n        ]            \n    ]\n]);?\u003e\n```\n\nTesting\n-------\n\nTo test the extension, is better to clone this repository on your computer. After, go to the extensions folder and do\nthe following (assuming you have `composer` installed on your computer): \n\n```bash \n$ composer install --no-interaction --prefer-source --dev\n```\nOnce all required libraries are installed then do: \n\n```bash \n$ vendor/bin/phpunit\n```\n\n\nFurther Information\n-------------------\nPlease, check the [X-Editable Plugin](http://vitalets.github.io/x-editable/index.html) documentation for further \ninformation about its configuration options. \n\nContributing\n------------\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\nCredits\n-------\n\n- [Antonio Ramirez](https://github.com/tonydspaniard)\n- [All Contributors](../../contributors)\n\nLicense\n-------\n\nThe BSD License (BSD). Please see [License File](LICENSE.md) for more information.\n\n\n\u003e [![2amigOS!](http://www.gravatar.com/avatar/55363394d72945ff7ed312556ec041e0.png)](http://www.2amigos.us)  \n\u003ci\u003eCustom Software | Web \u0026 Mobile Software Development\u003c/i\u003e  \n[www.2amigos.us](http://www.2amigos.us)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2amigos%2Fyii2-editable-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2amigos%2Fyii2-editable-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2amigos%2Fyii2-editable-widget/lists"}