Comments (1)
In order to use it, albeit in a untidy and lazy way, I've changed TableRenderer
:
private function renderAddButton()
{
$pathOptions = [
'd' => 'M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z'
];
$svgOptions = [
'xmlns' => 'http://www.w3.org/2000/svg',
'width' => 24,
'height' => 24,
'fill' => 'green',
'class' => 'bi bi-plus-circle-fill multiple-input-list__btn js-input-plus',
'viewBox' => '0 0 16 16'
];
$html = Html::beginTag( 'a', [ 'href' => '#' ] );
$html.= Html::beginTag( 'svg', $svgOptions );
$html.= Html::tag( 'path', Null, $pathOptions );
$html.= Html::endTag( 'svg' );
$html.= Html::endTag( 'a' );
return $html;
}
private function renderRemoveButton()
{
$pathOptions = [
'd' => 'M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z'
];
$svgOptions = [
'xmlns' => 'http://www.w3.org/2000/svg',
'width' => 24,
'height' => 24,
'fill' => 'red',
'class' => 'bi-x-circle-fill multiple-input-list__btn js-input-remove',
'viewBox' => '0 0 16 16'
];
$html = Html::beginTag( 'a', [ 'href' => '#' ] );
$html.= Html::beginTag( 'svg', $svgOptions );
$html.= Html::tag( 'path', Null, $pathOptions );
$html.= Html::endTag( 'svg' );
$html.= Html::endTag( 'a' );
return $html;
}
It works but sorry the messy code...
from yii2-multiple-input.
Related Issues (20)
- Cloning doesn't work for nested MultipleInput
- Add manual for each field for custom tabular input? HOT 4
- Embedded does not work correctly HOT 10
- duplicate keys causing strange behavior HOT 2
- Adding new row with DepDrop suddenly not working.
- Is it possible to keep the selected value of a DepDrop when submit returns error? HOT 1
- wrong version hardcoded in composer.json HOT 1
- add button position POS_ROW_BEGIN is shown under the first column HOT 6
- render addons in text fields HOT 2
- Html name attribute HOT 2
- all icon missing HOT 7
- Не работает подсветка ошибок при валидации вновь добавленных полей HOT 1
- The array is converted into an object
- Add button not showing in actionUpdate HOT 1
- Can't handle model update HOT 2
- Unable to get the file.
- Иногда не обновляется currentIndex после добавления первой строки HOT 3
- Не работает подсветка ошибок если полей более 9 HOT 1
- DateTimePicker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-multiple-input.