From 4033a8813cc8f58a6d15a89c6d1a974aafc1d51f Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 11 Mar 2023 17:23:44 +0100 Subject: [PATCH] EditTag: hide option for assigning parent --- controllers/EditTag.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/controllers/EditTag.php b/controllers/EditTag.php index 4b429267..adec592a 100644 --- a/controllers/EditTag.php +++ b/controllers/EditTag.php @@ -65,10 +65,6 @@ class EditTag extends HTMLController 'request_url' => BASEURL . '/edittag/?' . ($id_tag ? 'id=' . $id_tag : 'add'), 'content_below' => $after_form, 'fields' => [ - 'id_parent' => [ - 'type' => 'numeric', - 'label' => 'Parent tag ID', - ], 'id_asset_thumb' => [ 'type' => 'numeric', 'label' => 'Thumbnail asset ID', @@ -118,6 +114,7 @@ class EditTag extends HTMLController return $formview->adopt(new Alert('Some data missing', 'Please fill out the following fields: ' . implode(', ', $form->getMissing()), 'danger')); $data = $form->getData(); + $data['id_parent'] = 0; // Quick stripping. $data['slug'] = strtr($data['slug'], [' ' => '-', '--' => '-', '&' => 'and', '=>' => '', "'" => "", ":"=> "", '/' => '-', '\\' => '-']);