Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

SaveAndClearButtons()

Parameters

ColumnTypeDefaultDescription
$extraclass ""
$requiredfields false
$backtoresults false

Location

include/render_functions.php lines 4596 to 4658

Definition

 
function SaveAndClearButtons($extraclass="",$requiredfields=false,$backtoresults=false)
    {
    global 
$lang$multiple$ref$upload_review_mode$noupload$is_template,
    
$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 id='edit_reset_button' name='resetform' class='resetform' type='submit' value='" escape($lang["clearbutton"]) . "' />&nbsp;";
            }
            
?>
        <input 
         
        
if ($multiple
            { 
?>onclick="return confirm(' echo $confirm_text?>');"
             
            

            
?>
               name="save"
               id="edit_save_button"
               class="editsave"
               type="submit"
               value=" echo escape($save_btn_value); ?>" />
        
        
if($upload_review_mode)
            {
            
?>&nbsp;<input id="edit_save_auto_button" name="save_auto_next"  if(count($locked_fields) == 0){echo "style=\"display:none;\"";} ?>class="editsave save_auto_next" type="submit" value="&nbsp;&nbsp; echo escape($lang["save_and_auto"]) ?>&nbsp;&nbsp;" />
            
            
}

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

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

This article was last updated 13th December 2024 10:35 Europe/London time based on the source file dated 12th December 2024 19:40 Europe/London time.