Skip to content

Commit

Permalink
fix(form): tab name must obey 'show count' setting
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Oct 31, 2022
1 parent 631888e commit b89232e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,10 @@ class="far fa-trash-alt formcreator_delete_target"

public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
if ($item instanceof PluginFormcreatorForm) {
$nb = $_SESSION['glpishow_count_on_tabs'] ? $item->countTargets() : 0;
return [
1 => self::createTabEntry(
_n('Target', 'Targets', Session::getPluralNumber(), 'formcreator'),
_n('Target', 'Targets', $nb, 'formcreator'),
$item->countTargets()
),
2 => __('Preview'),
Expand Down

0 comments on commit b89232e

Please sign in to comment.