| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function initClientScript() |
||
| 46 | { |
||
| 47 | $widgetClass = self::$widgetClass; |
||
| 48 | $this->getView()->registerJs(<<<"JS" |
||
| 49 | $(document).on('click', '.{$widgetClass} a', function(e) { |
||
| 50 | var item = $(this); |
||
| 51 | item.parents('.amount-with-currency-widget').find('.iwd-label').text(item.data('label')); |
||
| 52 | item.parents('.amount-with-currency-widget').find(':hidden').val(item.data('value')).trigger('change'); |
||
| 53 | }); |
||
| 54 | JS |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |