verifyFormRequirements(); if (!$requirements["continue"]) { ?>
embedJavascriptInDOMDocument(); } /** * Print Card HTML * * @param Array $element * @param ?String $object * @param Closure $function * @return void */ function printGroup(array $element, int $index, ?String $object, bool $is_repetition = false, bool $is_last_repetition = false, bool $print_del_button = true, Closure $function = null): void { // Titolo della card $title = $element["title"] ?? camelCaseToWords($element["id"]); // Identifica se il corrente è una ripetizione $repeatable = !empty($object); // ID univoco dell'elemento $identifier = str_replace('.', '_', uniqid("npa.", true)); // ID univoco del gruppo di ripetizioni $reference = $repeatable ? "repeatable_" . $element["repeatable_reference"] : ""; // Decide se la card va stampata o meno (viene stampata per i blocchi singoli o per il primo blcoco di una ripetizione) $open_card = !$repeatable || !$is_repetition; $close_card = !$repeatable || $is_last_repetition; // Evitiamo il card inutile if (!$repeatable && $element["id"] == "anacForm") { $open_card = false; $close_card = false; } if ($repeatable && !$is_repetition && !($this->locked_repetitions[$element["id"]] ?? false)) { $add_button = $this->makeAddButtonElement($reference, $object); } $is_section_header = ($element["depth"] ?? -1) == 1; ?>= $title ?>