Skip to content

Commit

Permalink
fix(condition): missing FK when editing conditions
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Feb 3, 2020
1 parent 5caf1b0 commit c96f2f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,16 @@ public function showForm($ID, $options = []) {
// Buttons
echo '<table class="tab_cadre_fixe">';

echo '<tr>';
echo '<td colspan="4" class="center">';
$formFk = PluginFormcreatorForm::getForeignKeyField();
echo Html::hidden('id', ['value' => $ID]);
echo Html::hidden($formFk, ['value' => $this->fields[$formFk]]);
echo '</td>';
echo '</tr>';

echo '<tr>';
echo '<td colspan="5" class="center">';
echo Html::hidden('id', ['value' => $this->getID()]);
// echo '<input type="hidden" name="id" value="' . $this->getID() . '" />';
echo Html::submit(_x('button', 'Save'), ['name' => 'update']);
echo '</td>';
echo '</tr>';
Expand Down
10 changes: 8 additions & 2 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,16 @@ public function showForm($ID, $options = []) {
// Buttons
echo '<table class="tab_cadre_fixe">';

echo '<tr>';
echo '<td colspan="4" class="center">';
$formFk = PluginFormcreatorForm::getForeignKeyField();
echo Html::hidden('id', ['value' => $ID]);
echo Html::hidden($formFk, ['value' => $this->fields[$formFk]]);
echo '</td>';
echo '</tr>';

echo '<tr>';
echo '<td colspan="5" class="center">';
echo Html::hidden('id', ['value' => $this->getID()]);
echo '&nbsp;';
echo Html::submit(_x('button', 'Save'), ['name' => 'update']);
echo '</td>';
echo '</tr>';
Expand Down

0 comments on commit c96f2f5

Please sign in to comment.