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"); ?> getHtml(); ?> IsLoggedIn() && count($Privileges)) { $PrivFactory = new PrivilegeFactory(); return count($Privileges) - count($PrivFactory->GetPredefinedPrivilegeConstants()) + 1; } return $Default; } /** * function to print any error messages at top of the page * @param array|null $ErrorMessages */ function PrintErrorMessages($ErrorMessages): void { # if error messages were passed from PreferencesComplete if (isset($ErrorMessages) && is_array($ErrorMessages) && count($ErrorMessages) > 0) { # print error messages print("\n"); } } # ----- SETUP ---------------------------------------------------------------- if (!isset($H_ErrorMessages)) { $H_ErrorMessages = []; } $SaveButton = new HtmlButton("Save"); $SaveButton->setIcon("Disk.svg"); $CancelButton = new HtmlButton("Cancel"); $CancelButton->setIcon("Cross.svg"); $CancelButton->addSemanticClass("btn-danger"); $AddPrivilegeButton = new HtmlButton("Add another privilege"); $AddPrivilegeButton->setIcon("Plus.svg"); $AddPrivilegeButton->setId("AddField"); $AddPrivilegeButton->hide(); $AddPrivilegeButton->setOnclick("window.location='#TableBottom';return false;"); # ----- DISPLAY -------------------------------------------------------------- ?>

Custom Privilege Names

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.

Privilege Name
getHtml(); ?> getHtml(); ?>
getHtml(); ?>