Skip to content

Commit

Permalink
fix(formlist): remove useless links in menu
Browse files Browse the repository at this point in the history
helpdesk header does not shows extra buttons

Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Dec 2, 2021
1 parent 1ab4a06 commit e85e04b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions inc/formlist.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,11 @@ public static function getTypeName($nb = 0) {
return _n('Form', 'Forms', $nb, 'formcreator');
}

static function getMenuContent() {
public static function getMenuContent() {
$menu = parent::getMenuContent();
$menu['title'] = static::getTypeName(2);
$menu['page'] = '/' . Plugin::getWebDir('formcreator', false) . '/front/formlist.php';
$menu['page'] = PluginFormcreatorFormList::getSearchURL(false);
$menu['icon'] = 'fas fa-edit';
$image = '<i class="fa fa-check-square"
title="' . __('Forms waiting for validation', 'formcreator') . '"
alt="' . __('Forms waiting for validation', 'formcreator') . '"></i>';

$menu['links']['search'] = PluginFormcreatorFormList::getSearchURL(false);
if (PluginFormcreatorForm::canCreate()) {
$menu['links']['add'] = PluginFormcreatorForm::getFormURL(false);
}
$menu['links']['config'] = PluginFormcreatorForm::getSearchURL(false);
$menu['links'][$image] = PluginFormcreatorFormAnswer::getSearchURL(false);

return $menu;
}
Expand Down

0 comments on commit e85e04b

Please sign in to comment.