IsPredefined()) { # print entry and increment index PrintTextFormEntry( "F_PermissionText".$Index, $Privilege->Name(), $Privilege->Id() ); $Index++; } } # Print remaining blank entries for ($Index; $Index < $NumberOfEntries; $Index++) { $IsLast = ($Index + 1 == $NumberOfEntries) ? true : false; PrintTextFormEntry("F_PermissionText".$Index, "", "", $IsLast); } } /** * Print privilege edit row, with text entry and delete button * @param string $TextInputName Name to use for input field * @param string $TextInputValue Initial value to use for input field * @param string $TextInputId Privilege ID * @param boolean $IsLast If this is the last privilege field * @return void */ function PrintTextFormEntry( string $TextInputName, string $TextInputValue, string $TextInputId, bool $IsLast = false ): void { $DeleteButton = new HtmlButton("Delete"); $DeleteButton->setIcon("Delete.svg"); $DeleteButton->setSize(HtmlButton::SIZE_SMALL); $DeleteButton->addClass("DeletePrivilege"); $DeleteButton->setName($TextInputName . "_Delete"); ?>
The Edit Custom Privilege Flags page allows system administrators to add, update, and remove site-specific privilege flags. Custom privilege flags can be used anywhere the default privilege flags are used and are intended to provide finer-grained control of the collection development workflow or to provide new functionality.
= $AddPrivilegeButton->getHtml(); ?>