Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion components/ILIAS/UI/src/Component/Modal/RoundTrip.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
use ILIAS\UI\Component\Button;
use ILIAS\UI\Component\Component;
use ILIAS\UI\Component\ReplaceSignal;
use ILIAS\UI\Component\Input\Container\Container;
use ILIAS\UI\Component\Input\Container\Form\Standard;

/**
* @deprecated use {@see \ILIAS\UI\Component\Prompt\Prompt} instead
*/
interface RoundTrip extends Modal, Standard
interface RoundTrip extends Modal, Container
{
/**
* Get the title of the modal
Expand Down Expand Up @@ -66,6 +67,21 @@ public function withActionButtons(array $buttons): RoundTrip;
*/
public function withCancelButtonLabel(string $label): RoundTrip;

/**
* Get a modal like this with the provided submit button string.
*/
public function withSubmitLabel(string $label): self;

/**
* Gets the submit label of the form.
*/
public function getSubmitLabel(): ?string;

/**
* Get the URL this form posts its result to.
*/
public function getPostURL(): string;

/**
* Get the signal to replace the content of this modal.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ public function getReplaceSignal(): ReplaceSignal
return $this->modal->getReplaceSignal();
}

public function withAdditionalFormAction(string $action, string $label): static
{
$clone = clone $this;
$clone->modal = $clone->modal->withAdditionalFormAction($action, $label);
return $clone;
}

public function getPostURL(): string
{
return $this->modal->getPostURL();
Expand Down Expand Up @@ -230,7 +223,7 @@ public function withRequest(ServerRequestInterface $request): self
public function withInput(InputData $input_data): self
{
$clone = clone $this;
$clone->modal = $clone->modal->withInput($request);
$clone->modal = $clone->modal->withInput($input_data);
return $clone;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,6 @@ public function getError(): ?string
return $this->form->getError();
}

public function withAdditionalFormAction(string $action, string $label): static
{
$clone = clone $this;
$clone->form = $clone->form->withAdditionalFormAction($action, $label);
return $clone;
}

/**
* @inheritDoc
*/
Expand Down
Loading