-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] UI: align Container\Form context renderers.
- Loading branch information
Showing
7 changed files
with
41 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...emplates/default/Input/tpl.no_submit.html → ...ult/Input/tpl.without_submit_buttons.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ public function getNewDedicatedName(string $dedicated_name): string | |
/** | ||
* @author Thibeau Fuhrer <[email protected]> | ||
*/ | ||
class NoSubmitFormTest extends \ILIAS_UI_TestBase | ||
class FormWithoutSubmitButtonsTest extends \ILIAS_UI_TestBase | ||
{ | ||
protected SignalGenerator $signal_generator; | ||
protected NameSource $namesource; | ||
|
@@ -144,7 +144,8 @@ public function testRenderWithRequiredInputs(): void | |
public function testRenderWithError(): void | ||
{ | ||
$post_url = 'http://ilias.localhost/some_url?param1=foo¶m2=bar'; | ||
$error_lang_var = 'ui_error_in_group'; | ||
$error_lang_var = 'ui_error'; | ||
$error_lang_var_in_group = 'ui_error_in_group'; | ||
|
||
$dummy_input = $this->buildInputFactory()->text('test_label')->withAdditionalTransformation( | ||
$this->refinery->custom()->constraint( | ||
|
@@ -171,11 +172,12 @@ static function ($value): bool { | |
$form = $form->withRequest($request); | ||
$data = $form->getData(); | ||
|
||
$expected_html = | ||
"<form id=\"id_1\" role=\"form\" class=\"c-form c-form--horizontal\" enctype=\"multipart/form-data\" action=\"$post_url\" method=\"post\" novalidate=\"novalidate\">" . | ||
"<div id=\"\" class=\"c-form__error-msg alert alert-danger\">$error_lang_var</div>" . | ||
$dummy_input->getCanonicalName() . | ||
"</form>"; | ||
$expected_html = <<<EOT | ||
<form id="id_2" role="form" class="c-form c-form--horizontal" enctype="multipart/form-data" describedby="id_1" action="$post_url" method="post" novalidate="novalidate"> | ||
<div class="c-form__error-msg alert alert-danger" id="id_1"><span class="sr-only">$error_lang_var:</span>$error_lang_var_in_group | ||
</div>{$dummy_input->getCanonicalName()} | ||
</form> | ||
EOT; | ||
|
||
$context = $this->createMock(\ILIAS\UI\Component\Modal\RoundTrip::class); | ||
$context->method('getCanonicalName')->willReturn('RoundTripModal'); | ||
|