Skip to content

Commit

Permalink
feat(form): better target list presentation
Browse files Browse the repository at this point in the history
btry committed May 10, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f7320a5 commit 343e526
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions inc/form.class.php
Original file line number Diff line number Diff line change
@@ -501,21 +501,27 @@ public function showFormAnswerProperties($ID, $options = []) {
public function showTargets($ID, $options = []) {
echo '<table class="tab_cadrehov">';
echo '<tr>';
echo '<th colspan="3">'._n('Target', 'Targets', 2, 'formcreator').'</th>';
echo '<th>'._n('Target', 'Targets', 2, 'formcreator').'</th>';
echo '<th>'.__('Type', 'formcreator').'</th>';
echo '<th class="right">'.__('Actions', 'formcreator').'</th>';
echo '</tr>';

$allTargets = $this->getTargetsFromForm();
$i = 0;
foreach ($allTargets as $targetType => $targets) {
foreach ($targets as $targetId => $target) {
/** @var PluginFormcreatorAbstractTarget $target */
$i++;
echo '<tr class="tab_bg_'.($i % 2).'">';
$targetItemUrl = $targetType::getFormURLWithID($targetId);
echo '<td><a href="' . $targetItemUrl . '">';

echo $target->fields['name'];
echo '</a></td>';

echo '<td>';
echo $target->getTypeName();
echo '</td>';

echo '<td align="center" width="32">';
echo '<i
class="far fa-trash-alt formcreator_delete_target"

0 comments on commit 343e526

Please sign in to comment.