| @@ 548-567 (lines=20) @@ | ||
| 545 | * The on_submit event handles all operations immediately. This includes title updates (all |
|
| 546 | * are done regardless of actual updates). |
|
| 547 | */ |
|
| 548 | function on_submit($results) |
|
| 549 | { |
|
| 550 | if (! array_key_exists($this->name, $results)) |
|
| 551 | { |
|
| 552 | return; |
|
| 553 | } |
|
| 554 | ||
| 555 | $values = $results[$this->name]; |
|
| 556 | ||
| 557 | $this->_check_new_upload($values); |
|
| 558 | ||
| 559 | foreach (array_keys($this->_type->attachments_info) as $identifier) |
|
| 560 | { |
|
| 561 | $this->_check_for_update($identifier, $values); |
|
| 562 | } |
|
| 563 | ||
| 564 | // Rebuild Widget |
|
| 565 | $this->_compute_elements(); |
|
| 566 | $this->_group->setElements($this->_elements); |
|
| 567 | } |
|
| 568 | ||
| 569 | /** |
|
| 570 | * Freeze the entire group, special handling applies to skip all elements which cannot be |
|
| @@ 640-659 (lines=20) @@ | ||
| 637 | * The on_submit event handles all operations immediately. This includes title updates (all |
|
| 638 | * are done regardless of actual updates). |
|
| 639 | */ |
|
| 640 | function on_submit($results) |
|
| 641 | { |
|
| 642 | if (! array_key_exists($this->name, $results)) |
|
| 643 | { |
|
| 644 | return; |
|
| 645 | } |
|
| 646 | ||
| 647 | $values = $results[$this->name]; |
|
| 648 | ||
| 649 | $this->_check_new_upload($values); |
|
| 650 | ||
| 651 | foreach (array_keys($this->_type->images) as $identifier) |
|
| 652 | { |
|
| 653 | $this->_check_for_update($identifier, $values); |
|
| 654 | } |
|
| 655 | ||
| 656 | // Rebuild Widget |
|
| 657 | $this->_compute_elements(); |
|
| 658 | $this->_group->setElements($this->_elements); |
|
| 659 | } |
|
| 660 | ||
| 661 | /** |
|
| 662 | * Freeze the entire group, special handling applies to skipp all elements which cannot be |
|