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 4241 to 4294

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 12th May 2021 04:35 Europe/London time based on the source file dated 11th May 2021 10:25 Europe/London time.