Skip to content

Commit b89232e

Browse files
committed
fix(form): tab name must obey 'show count' setting
1 parent 631888e commit b89232e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inc/form.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,10 @@ class="far fa-trash-alt formcreator_delete_target"
556556

557557
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
558558
if ($item instanceof PluginFormcreatorForm) {
559+
$nb = $_SESSION['glpishow_count_on_tabs'] ? $item->countTargets() : 0;
559560
return [
560561
1 => self::createTabEntry(
561-
_n('Target', 'Targets', Session::getPluralNumber(), 'formcreator'),
562+
_n('Target', 'Targets', $nb, 'formcreator'),
562563
$item->countTargets()
563564
),
564565
2 => __('Preview'),

0 commit comments

Comments
 (0)