| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function updateForm() |
||
| 15 | { |
||
| 16 | $fields = $this->owner->Fields(); |
||
| 17 | $reservation = $this->owner->getReservation(); |
||
| 18 | $event = $reservation->Event(); |
||
| 19 | |||
| 20 | if (!$event->DisableDiscountField) { |
||
| 21 | $fields->add( |
||
| 22 | $field = DiscountField::create('CouponCode', _t('DiscountForm.COUPON_CODE', 'Coupon code')) |
||
| 23 | ); |
||
| 24 | $field->setForm($this->owner); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 |