| @@ 606-619 (lines=14) @@ | ||
| 603 | * @param HTTPRequest $request |
|
| 604 | * @return Form |
|
| 605 | */ |
|
| 606 | public function fileEditForm($request = null) |
|
| 607 | { |
|
| 608 | // Get ID either from posted back value, or url parameter |
|
| 609 | if (!$request) { |
|
| 610 | $this->httpError(400); |
|
| 611 | return null; |
|
| 612 | } |
|
| 613 | $id = $request->param('ID'); |
|
| 614 | if (!$id) { |
|
| 615 | $this->httpError(400); |
|
| 616 | return null; |
|
| 617 | } |
|
| 618 | return $this->getFileEditForm($id); |
|
| 619 | } |
|
| 620 | ||
| 621 | /** |
|
| 622 | * The form is used to generate a form schema, |
|
| @@ 640-653 (lines=14) @@ | ||
| 637 | * |
|
| 638 | * @return Form |
|
| 639 | */ |
|
| 640 | public function fileInsertForm($request = null) |
|
| 641 | { |
|
| 642 | // Get ID either from posted back value, or url parameter |
|
| 643 | if (!$request) { |
|
| 644 | $this->httpError(400); |
|
| 645 | return null; |
|
| 646 | } |
|
| 647 | $id = $request->param('ID'); |
|
| 648 | if (!$id) { |
|
| 649 | $this->httpError(400); |
|
| 650 | return null; |
|
| 651 | } |
|
| 652 | return $this->getFileInsertForm($id); |
|
| 653 | } |
|
| 654 | ||
| 655 | /** |
|
| 656 | * Abstract method for generating a form for a file |
|