Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

SaveAndClearButtons()

Description

Render the 'QuestionSubmit' div with the 'Save', 'Clear' and 'Save all with values' locked Buttons - used by the resource edit page

Parameters

ColumnTypeDefaultDescription
$extraclass string "" - Additional CSS classes to add to the Question div
$requiredfields bool false - to indicate the input is required
$backtoresults bool false - Show the next/back links using EditNav()

Return

void

Location

include/render_functions.php lines 4223 to 4276

Definition

 
function SaveAndClearButtons($extraclass="",$requiredfields=false,$backtoresults=false)
    {
    global 
$lang$multiple$ref$upload_review_mode$noupload$is_template,
    
$show_required_field_label$modal$edit_selection_collection_resources$locked_fields;

    
$save_btn_value = ($ref ? ($upload_review_mode $lang["saveandnext"] : $lang["save"]) : $lang["next"]);
    if(
$ref && $noupload)
        {
        
$save_btn_value $lang['create'];
        }

    
$confirm_text $lang["confirmeditall"];
    if(
$edit_selection_collection_resources)
        {
        
$confirm_text $lang["confirm_edit_all_selected_resources"];
        }
    
?>
    <div class="QuestionSubmit  echo $extraclass ?>">
        
        
if($ref || $upload_review_mode)
            {
            echo 
"<input name='resetform' class='resetform' type='submit' value='" $lang["clearbutton"] . "' />&nbsp;";
            }
            
?>
        <input  if ($multiple) { ?>onclick="return confirm(' echo $confirm_text?>');" ?>
               name="save"
               class="editsave"
               type="submit"
               value="&nbsp;&nbsp; echo $save_btn_value?>&nbsp;&nbsp;" />
        
        
if($upload_review_mode)
            {
            
?>&nbsp;<input name="save_auto_next"  if(count($locked_fields) == 0){echo "style=\"display:none;\"";} ?>class="editsave save_auto_next" type="submit" value="&nbsp;&nbsp; echo $lang["save_and_auto"?>&nbsp;&nbsp;" />
            
            
}

        if(!
$is_template && $show_required_field_label && $requiredfields)
            {
            
?>
            <div class="RequiredFieldLabel"><sup>*</sup>  echo $lang['requiredfield']; ?></div>
            
            
}

        
# Duplicate navigation
       
if (!$multiple && !$modal && $ref>&& !hook("dontshoweditnav") && $backtoresults)
            {
            
EditNav();
            }
            
?>
        <br />
        <div class="clearerleft"> </div>
    </div>
    
    
}

This article was last updated 28th February 2021 21:05 Europe/London time based on the source file dated 22nd February 2021 17:55 Europe/London time.