Admin: Fix creation of new access url

pull/5671/head
Angel Fernando Quiroz Campos 1 year ago
parent ec95a5ce34
commit 22066f8115
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 6
      public/main/admin/access_url_edit.php

@ -6,6 +6,8 @@
* @author Julio Montoya <gugli100@gmail.com>
*/
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\ServiceHelper\AccessUrlHelper;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
$cidReset = true;
@ -57,6 +59,10 @@ if ($httpRequest->query->has('url_id')) {
$submit_name = get_lang('Add URL');
}
$form->addHidden(
'parentResourceNodeId',
Container::$container->get(AccessUrlHelper::class)->getFirstAccessUrl()->resourceNode->getId()
);
$form->addButtonCreate($submit_name);
//the first url with id = 1 will be always active

Loading…
Cancel
Save