getAllLicenseTypes(); $fromInterne = array_key_exists('want_license', $_POST); $wantLicense = $fromInterne ? !empty($_POST['want_license']) : (!empty($_POST['cc2r']) || !empty($_POST['license_id']) || !empty($_POST['license_custom'])); $cc2r = ($fromInterne && !$wantLicense) ? false : !empty($_POST['cc2r']); FragmentRenderer::render('form/_licence', [ 'adminMode' => true, 'accessTypeId' => $_POST['access_type_id'] ?? '', 'licenseId' => $_POST['license_id'] ?? '', 'licenseCustom' => $_POST['license_custom'] ?? '', 'cc2r' => $cc2r, 'wantLicense' => $wantLicense, 'hxPost' => '/admin/fragments/licence.php', 'licenseTypes' => $licenseTypes, ]);