##
## $Source: /usr/cvsroot/melati/melati/src/main/java/org/melati/admin/Updated.wm,v $
## $Revision: 1.15 $
##
## Copyright (C) 2000 William Chesters
##
## Part of Melati (http://melati.org), a framework for the rapid
## development of clean, maintainable web applications.
##
##
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
 <title>Updated a $ml.rendered($melati.Table.DisplayName) Record</title>
 <meta name="version" content="CVS \$Id: Updated.wm,v 1.15 2011/08/13 23:26:40 timp Exp $">
 <link rel="stylesheet" title="Default" href="$admin.getScreenStylesheetURL($melati)"
      type="text/css" media="screen">
<!-- 
return target = 
#if ($Form.returnTarget) #begin
$Form.returnTarget
#end 
return url = 
#if($Form.returnURL) #begin
$Form.returnURL
#end

-->

#if ($melati.getTable().getName().equalsIgnoreCase("tableinfo")) #begin
 <script type="text/javascript">
  function reload() {

   #if ($object) #begin
    top.location.href="$object.troid()/Main";
   #end #else #begin
    top.location.href="$admin.MainURL($melati)";
   #end
  }
 </script>
#end #else #begin
  #if ($Form.returnTarget) #begin
 <script type="text/javascript">
  function reload() {
    $(Form.returnTarget).location.href="$Form.returnURL";
    $(Form.returnTarget).focus();
  }
 </script>
  #end #else #begin
    #if ($Form.returnURL) #begin
 <script type="text/javascript">
  function reload() {
    location.href="$Form.returnURL";
  }
 </script>
    #end #else #begin
 <script type="text/javascript">
  function reload() {
    location.href="Edit";
  }
 </script>
    #end
  #end 
#end
#if ($Form.returnfield) #begin
 <script language="JavaScript" TYPE="text/javascript">
  function updateCaller(returnfield, id, value) {
    opener.updateFromPopup(parent, returnfield, id, value)
  }
 </script>
</HEAD>
<BODY bgcolor="#cccccc" 
      onLoad="updateCaller('$Form.returnfield',$melati.Object.Troid,'$ml.escaped($melati.Object)')"
      id="done">
#end #else #begin
</HEAD>
<BODY bgcolor="#cccccc" onLoad="reload()" id="done">
#end
<br/><br/><br/><br/>
<h3 align="center">
  <font face="Arial, Helvetica">
    <a 
#if ($melati.getTable().getName().equalsIgnoreCase("tableinfo")) #begin
        href="$admin.MainURL($melati)"
        target="_top"
#end #else #begin 
  #if ($Form.returnURL) #begin
        href="$Form.returnURL"
   #end #else #begin
    #if ($melati.Method == "Created") #begin
        href="$melati.Object.troid()/Edit"  
    #end #else #begin 
        href="Edit"  
    #end
  #end
  #if ($Form.returnTarget) #begin
        target="$admin.simpleName($Form.returnTarget)"
  #end #else #begin
        target=""
  #end
#end

        id="continue"
    >Done</a>
  </font>
</h3>

## Used in testCreateTableStory 
<form method="GET" action="?">
<input type="hidden" name="troid"
#if ($melati.Object) #begin
  value="$melati.Object.troid()"
  source="melati"
#end #else  #begin
  #if ($object) #begin
    value="$object.troid()"
    source="object"
  #end
#end
>
</form>
</BODY>
</HTML>
