<?PHP
#
#   FILE:  EditAboutTextComplete.php
#
#   Part of the Collection Workflow Integration System (CWIS)
#   Copyright 2004-2013 Edward Almasy and Internet Scout Research Group
#   http://scout.wisc.edu/cwis/
#

# check if current user is authorized
if (!CheckAuthorization(PRIV_SYSADMIN)) {  return;  }

$ErrorMessages = new ErrorList();

# if save changes was requested
if ($_POST["Submit"] != "Cancel")
{
    # save new about text
    if (isset($_POST["F_AboutText"]))
        $SysConfig->AboutText($_POST["F_AboutText"]);
}

# if errors were found
if (isset($ErrorMessages) && $ErrorMessages->HasErrors())
{
    # return to editing page with error messages
    $Session->PassVariable("ErrorMessages");
    $AF->SetJumpToPage("EditAboutText");
}
else if ( $Session->Get("FromSysConfig") )
{
    # go to the sys config page if we came from there
    $AF->SetJumpToPage("EditSysConfig");
}
else
{
    # go to the About page
    $AF->SetJumpToPage("About");
}

?>
