<?PHP

#
#   FILE:  SPT--EditAboutTextComplete.php
#
#   FORM FIELDS EXPECTED:
#       F_AboutText
#           - new about text
#
#   Part of the Scout Portal Toolkit
#   Copyright 2004 Internet Scout Project
#   http://scout.wisc.edu
#

# 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");
}

?>
