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