Removed the Javascript, since I realized that
[invirt/packages/invirt-web.git] / templates / info.tmpl
index 29b5907..8baeab7 100644 (file)
@@ -15,18 +15,8 @@ Info on $machine.name
 #end def
 
 #def commands()
-<script>
-function commandButton(elt, action){
-  form = elt.up('', 4);
-  cdrom = Form.serialize(form, true).cdrom;
-  new Ajax.Request('command', {method: 'post', 
-  parameters: 'machine_id=$machine.machine_id&js=info&cdrom='+cdrom+'&action='+action,
-  onSuccess: replaceFunc
-  });
-  return false;
-}
-</script>
 <form action="command" action="POST">
+  <input type="hidden" name="back" value="info"/>
   <input type="hidden" name="machine_id" value="$machine.machine_id"/>
   <table>
     
@@ -43,11 +33,11 @@ function commandButton(elt, action){
     </td></tr>
       <tr>
        #if $on
-       <td><input type="submit" class="button" name="action" value="Power off" onclick="return commandButton(this, 'Power off');"/></td>
-       <td><input type="submit" class="button" name="action" value="Shutdown" onclick="return commandButton(this, 'Shutdown');"/></td>
-       <td><input type="submit" class="button" name="action" value="Reboot" onclick="return commandButton(this, 'Reboot');"/></td>
+       <td><input type="submit" class="button" name="action" value="Power off"/></td>
+       <td><input type="submit" class="button" name="action" value="Shutdown"/></td>
+       <td><input type="submit" class="button" name="action" value="Reboot"/></td>
        #else
-       <td><input type="submit" class="button" name="action" value="Power on" onclick="return commandButton(this, 'Power on');"/></td>
+       <td><input type="submit" class="button" name="action" value="Power on"/></td>
        #end if
       <td>Boot CD:</td>
       <td>$cdromList($cdroms)</td>
@@ -69,7 +59,7 @@ function commandButton(elt, action){
 (To edit ram, disk size, or machine name, turn off the machine first.)
 #end if
 </p>
-<form action="modify" method="POST" onsubmit="return jsFormSubmit('modify', this);">
+<form action="modify" method="POST">
   <input type="hidden" name="machine_id" value="$defaults.machine_id"/>
   <table>
     <tr><td>Owner${helppopup("owner")}:</td><td><input type="text" name="owner", value="$defaults.owner"/></td></tr>