| @@ 614-627 (lines=14) @@ | ||
| 611 | * @param HTTPRequest $request |
|
| 612 | * @return Form |
|
| 613 | */ |
|
| 614 | public function fileEditForm($request = null) |
|
| 615 | { |
|
| 616 | // Get ID either from posted back value, or url parameter |
|
| 617 | if (!$request) { |
|
| 618 | $this->httpError(400); |
|
| 619 | return null; |
|
| 620 | } |
|
| 621 | $id = $request->param('ID'); |
|
| 622 | if (!$id) { |
|
| 623 | $this->httpError(400); |
|
| 624 | return null; |
|
| 625 | } |
|
| 626 | return $this->getFileEditForm($id); |
|
| 627 | } |
|
| 628 | ||
| 629 | /** |
|
| 630 | * The form is used to generate a form schema, |
|
| @@ 649-662 (lines=14) @@ | ||
| 646 | * @param HTTPRequest $request |
|
| 647 | * @return Form |
|
| 648 | */ |
|
| 649 | public function fileInsertForm($request = null) |
|
| 650 | { |
|
| 651 | // Get ID either from posted back value, or url parameter |
|
| 652 | if (!$request) { |
|
| 653 | $this->httpError(400); |
|
| 654 | return null; |
|
| 655 | } |
|
| 656 | $id = $request->param('ID'); |
|
| 657 | if (!$id) { |
|
| 658 | $this->httpError(400); |
|
| 659 | return null; |
|
| 660 | } |
|
| 661 | return $this->getFileInsertForm($id); |
|
| 662 | } |
|
| 663 | ||
| 664 | /** |
|
| 665 | * The form used to generate a form schema, since it's used directly on API endpoints, |
|
| @@ 682-695 (lines=14) @@ | ||
| 679 | * @param HTTPRequest $request |
|
| 680 | * @return Form |
|
| 681 | */ |
|
| 682 | public function fileEditorLinkForm($request = null) |
|
| 683 | { |
|
| 684 | // Get ID either from posted back value, or url parameter |
|
| 685 | if (!$request) { |
|
| 686 | $this->httpError(400); |
|
| 687 | return null; |
|
| 688 | } |
|
| 689 | $id = $request->param('ID'); |
|
| 690 | if (!$id) { |
|
| 691 | $this->httpError(400); |
|
| 692 | return null; |
|
| 693 | } |
|
| 694 | return $this->getFileInsertForm($id); |
|
| 695 | } |
|
| 696 | ||
| 697 | /** |
|
| 698 | * Abstract method for generating a form for a file |
|