Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

renderLockButton()

Description

Renders a lock button for a field - used to 'lock' metadata in upload_review_mode

Parameters

ColumnTypeDefaultDescription
$name string The field identifier e.g. 'resource_type', '18'
$locked_fields array array - Array of locked field identifiers

Return

void

Location

include/render_functions.php lines 2409 to 2417

Definition

 
function renderLockButton($name$locked_fields=array())
    {
    global 
$lang;
    
?>
    <button type="submit" class="lock_icon" id="lock_icon_ echo htmlspecialchars($name) ; ?>" onClick="toggleFieldLock(' echo htmlspecialchars($name) ; ?>');return false;" title=" echo $lang['lock-tooltip']; ?>">
        <i aria-hidden="true" class="fa  if(in_array($name,$locked_fields)){echo "fa-lock";} else {echo "fa-unlock";} ?> fa-fw"></i>
    </button>
        
    
}

This article was last updated 12th July 2020 03:05 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.