Collections functions
General functions
Render functions
Theme permission functions
Resource functions

DrawOption()

Description

Renders an option in the Permission Manager (admin_group_permissions.php page)

Parameters

ColumnTypeDefaultDescription
$permission string Permission identifier
$description string User friendly description of the permission
$reverse boolean false Reverse the permission
$reload boolean false Autosave changes done on this permission
$disabled boolean false Disable this permission as another supersedes it (greys it out and checks it)

Return

void

Location

include/render_functions.php lines 4965 to 4979

Definition

 
function DrawOption($permission,$description,$reverse=false,$reload=false,$disabled=false)
    {
    global 
$permissions,$permissions_done;
    
$checked=(in_array($permission,$permissions));
    if (
$reverse) {$checked=!$checked;}
    
?>
    <input type="hidden" name="permission_ echo base64_encode($permission)?>" value=" echo ($reverse)?"reverse":"normal" ?>">
    <tr>
        <td> echo $description?></td>
        <td><input type="checkbox"  if ($disabled) {$checked=true?>disabled ?> name="checked_ echo base64_encode($permission?> 
            
if ($checked) { ?> checked  ?> if ($reload) { ?> onChange="CentralSpacePost(this.form,false);"  ?>></td>
    </tr>
    
    $permissions_done
[]=$permission;
    }

This article was last updated 30th September 2022 16:35 Europe/London time based on the source file dated 22nd September 2022 16:20 Europe/London time.