Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function updateItemEditForm(Form $form) |
||
19 | { |
||
20 | // NOTE: this extension is applied to new item edit form only |
||
21 | |||
22 | $record = $form->getRecord(); |
||
23 | if ($record instanceof BaseElement) { |
||
24 | // prevent lost changes popup message when creating a new element |
||
25 | $form->addExtraClass('discardchanges'); |
||
26 | } |
||
29 |