Skip to content

Commit

Permalink
VACMS-14793: Do not use the trait yet. We have to wait until the va_g…
Browse files Browse the repository at this point in the history
…ov_menus module is installed.
  • Loading branch information
dsasser committed Sep 21, 2023
1 parent 677c77b commit dc25f9e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent;
use Drupal\core_event_dispatcher\FormHookEvents;
use Drupal\va_gov_menus\Traits\MenuFormAlterTrait;
use Drupal\va_gov_user\Service\UserPermsService;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

Expand All @@ -13,8 +12,6 @@
*/
class FormEventSubscriber implements EventSubscriberInterface {

use MenuFormAlterTrait;

/**
* The VA user permission service.
*
Expand Down Expand Up @@ -62,7 +59,7 @@ public function formAlter(FormAlterEvent $event): void {
$formId = $event->getFormId();
$admin = $this->permsService->hasAdminRole(TRUE);
if (in_array($formId, $this->menus) && !$admin) {
$this->hideMenuLinkDescriptionField($form);
$form['description']['#access'] = FALSE;
}
}

Expand Down

0 comments on commit dc25f9e

Please sign in to comment.