Skip to content

Commit

Permalink
fix(form): compatibility with themes
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed May 7, 2021
1 parent b211bd3 commit 43ae998
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ public function showTargets($ID, $options = []) {
foreach ($allTargets as $targetType => $targets) {
foreach ($targets as $targetId => $target) {
$i++;
echo '<tr class="line'.($i % 2).'">';
echo '<tr>';
$targetItemUrl = Toolbox::getItemTypeFormURL($targetType) . '?id=' . $targetId;
// echo '<td onclick="document.location=\'' . $targetItemUrl . '\'" style="cursor: pointer">';
$onclick = "plugin_formcreator_editTarget('$targetType', $targetId)";
Expand All @@ -676,7 +676,7 @@ public function showTargets($ID, $options = []) {
}

// Display add target link...
echo '<tr class="line'.(($i + 1) % 2).'" id="add_target_row">';
echo '<tr id="add_target_row">';
echo '<td colspan="3">';
echo '<a href="javascript:plugin_formcreator_addTarget('.$ID.', \''.$token.'\');">
<i class="fa fa-plus"></i>
Expand All @@ -686,7 +686,7 @@ public function showTargets($ID, $options = []) {
echo '</tr>';

// OR display add target form
echo '<tr class="line'.(($i + 1) % 2).'" id="add_target_form" style="display: none;">';
echo '<tr id="add_target_form" style="display: none;">';
echo '<td colspan="3" id="add_target_form_td"></td>';
echo '</tr>';

Expand Down Expand Up @@ -2350,7 +2350,7 @@ public function showAddTargetForm() {

echo '<tr><th colspan="4">'.__('Add a target', 'formcreator').'</th></tr>';

echo '<tr class="line1">';
echo '<tr>';
echo '<td width="15%"><strong>'.__('Name').' <span style="color:red;">*</span></strong></td>';
echo '<td width="40%"><input type="text" name="name" style="width:100%;" value="" required="required"/></td>';
echo '<td width="15%"><strong>'._n('Type', 'Types', 1).' <span style="color:red;">*</span></strong></td>';
Expand All @@ -2369,7 +2369,7 @@ public function showAddTargetForm() {
echo '</td>';
echo '</tr>';

echo '<tr class="line0">';
echo '<tr>';
echo '<td colspan="4" class="center">';
echo Html::hidden('plugin_formcreator_forms_id', ['value' => $this->getID()]);
echo Html::submit(__('Add'), ['name' => 'add_target']);
Expand Down

0 comments on commit 43ae998

Please sign in to comment.