SHOW:
|
|
- or go back to the newest paste.
| 1 | - | public function getControl() {
|
| 1 | + | public function getControl() |
| 2 | - | $control = parent::getControl(); |
| 2 | + | {
|
| 3 | - | |
| 3 | + | $select = parent::getControl(); |
| 4 | - | $name = $control->name; |
| 4 | + | $select->name .= '[currency]'; |
| 5 | - | $id = $control->id; |
| 5 | + | // $select->id .= '-currency'; // tenhle měnit nechceš, aby na něj šlo prokliknout z labelu |
| 6 | $select->value = $this->value['currency']; | |
| 7 | - | $control->name .= '[currency]'; |
| 7 | + | |
| 8 | - | $control->id .= '-currency'; |
| 8 | + | $price = parent::getControl(); |
| 9 | - | $control->value = $this->value['currency']; |
| 9 | + | $price->name .= '[amount]'; |
| 10 | $price->id .= '-amount'; | |
| 11 | - | $priceInput = Html::el('input')->name($name.'[amount]')->id($id.'-amount');
|
| 11 | + | $price->value = $this->value['amount']; |
| 12 | - | // debug($this->value); |
| 12 | + | |
| 13 | - | $priceInput->value = $this->value['amount']; |
| 13 | + | return Html::el()->add($price)->add($select); |
| 14 | } |