Skip to content

Commit 2af45c4

Browse files
g5botHuxinator
authored andcommitted
fix ticket-0736
1 parent c7bbda8 commit 2af45c4

File tree

6 files changed

+8
-16
lines changed

6 files changed

+8
-16
lines changed

src/Module/Colony/Lib/Gui/ColonyGuiHelper.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Stu\Lib\Colony\PlanetFieldHostInterface;
1010
use Stu\Lib\Component\ComponentRegistrationInterface;
1111
use Stu\Module\Control\GameControllerInterface;
12-
use Stu\Orm\Entity\ColonyInterface;
1312
use Stu\Orm\Entity\ColonySandboxInterface;
1413

1514
final class ColonyGuiHelper implements ColonyGuiHelperInterface
@@ -30,13 +29,10 @@ public function registerMenuComponents(
3029
$game->setTemplateVar('HOST', $host);
3130
$game->setTemplateVar('CURRENT_MENU', $menu);
3231

33-
if ($host instanceof ColonyInterface) {
34-
$game->setTemplateVar('COLONY', $host);
35-
$game->setTemplateVar('FORM_ACTION', 'colony.php');
36-
}
3732
if ($host instanceof ColonySandboxInterface) {
3833
$game->setTemplateVar('COLONY', $host->getColony());
39-
$game->setTemplateVar('FORM_ACTION', '/admin/index.php');
34+
} else {
35+
$game->setTemplateVar('COLONY', $host);
4036
}
4137
}
4238

src/Module/Colony/View/ShowField/ShowField.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public function handle(GameControllerInterface $game): void
6767

6868
if ($host instanceof ColonyInterface) {
6969
$game->setTemplateVar('COLONY', $host);
70-
$game->setTemplateVar('FORM_ACTION', 'colony.php');
7170
$game->setTemplateVar('SHIP_BUILD_PROGRESS', $this->colonyShipQueueRepository->getByColonyAndMode($host->getId(), 1));
7271
$game->setTemplateVar('SHIP_RETROFIT_PROGRESS', $this->colonyShipQueueRepository->getByColonyAndMode($host->getId(), 2));
7372

@@ -104,11 +103,8 @@ public function handle(GameControllerInterface $game): void
104103
'TERRAFORMING_STATE',
105104
$terraFormingState
106105
);
107-
} else {
108-
$game->setTemplateVar('FORM_ACTION', '/admin/index.php');
109106
}
110107

111-
112108
$game->setPageTitle(sprintf('Feld %d - Informationen', $field->getFieldId()));
113109
$game->setMacroInAjaxWindow('html/colony/component/fieldAction.twig');
114110

@@ -154,4 +150,4 @@ private function getConstructionStatusBar(PlanetFieldInterface $field, BuildingI
154150
->setValue($field->getBuildProgress())
155151
->render();
156152
}
157-
}
153+
}

src/html/colony/menu/formContainer.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<form action="{{ FORM_ACTION }}" method="post">
2+
<form action="colony.php" method="post">
33
{% block containment %}
44
...
55
{% endblock %}

src/html/colony/menu/submenuForm.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<form action="{{ FORM_ACTION }}" method="post">
1+
<form action="colony.php" method="post">
22
<input type="hidden" name="id" value="{{ HOST.getId }}" />
33
<input type="hidden" name="hosttype" value="{{ HOST.getHostType.value }}" />
44
<input type="hidden" name="sstr" value="{{ SESSIONSTRING }}" />

src/html/spacecraft/waste.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<form action="{{ FORM_ACTION }}" method="post">
1+
<form action="colony.php" method="post">
22
<input type="hidden" name="id" value="{{ SPACECRAFT.getId }}" />
33
<input type="hidden" name="sstr" value="{{ SESSIONSTRING }}" />
44
{% block containment %}
@@ -40,4 +40,4 @@
4040
</table>
4141
</div>
4242
{% endblock %}
43-
</form>
43+
</form>

tests/inttest/html/__snapshots__/AllViewControllerTest--COLONY_VIEWS-SHOW_MODULEFAB.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="de" xmlns:stu="stu">
33
<body>
4-
<form action="" method="post">
4+
<form action="colony.php" method="post">
55
<input type="hidden" name="id" value="42">
66
<input type="hidden" name="hosttype" value="1">
77
<input type="hidden" name="sstr" value="MOCKED_SESSIONSTRING">

0 commit comments

Comments
 (0)