Changeset 207 for trunk/web/templates/info.tmpl
- Timestamp:
- Oct 20, 2007, 10:14:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/templates/info.tmpl
r205 r207 16 16 17 17 #def commands() 18 <script>19 function commandButton(elt, action){20 form = elt.up('', 4);21 cdrom = Form.serialize(form, true).cdrom;22 new Ajax.Request('command', {method: 'post',23 parameters: 'machine_id=$machine.machine_id&js=info&cdrom='+cdrom+'&action='+action,24 onSuccess: replaceFunc25 });26 return false;27 }28 </script>29 18 <form action="command" action="POST"> 19 <input type="hidden" name="back" value="info"/> 30 20 <input type="hidden" name="machine_id" value="$machine.machine_id"/> 31 21 <table> … … 44 34 <tr> 45 35 #if $on 46 <td><input type="submit" class="button" name="action" value="Power off" onclick="return commandButton(this, 'Power off');"/></td>47 <td><input type="submit" class="button" name="action" value="Shutdown" onclick="return commandButton(this, 'Shutdown');"/></td>48 <td><input type="submit" class="button" name="action" value="Reboot" onclick="return commandButton(this, 'Reboot');"/></td>36 <td><input type="submit" class="button" name="action" value="Power off"/></td> 37 <td><input type="submit" class="button" name="action" value="Shutdown"/></td> 38 <td><input type="submit" class="button" name="action" value="Reboot"/></td> 49 39 #else 50 <td><input type="submit" class="button" name="action" value="Power on" onclick="return commandButton(this, 'Power on');"/></td>40 <td><input type="submit" class="button" name="action" value="Power on"/></td> 51 41 #end if 52 42 <td>Boot CD:</td> … … 70 60 #end if 71 61 </p> 72 <form action="modify" method="POST" onsubmit="return jsFormSubmit('modify', this);">62 <form action="modify" method="POST"> 73 63 <input type="hidden" name="machine_id" value="$defaults.machine_id"/> 74 64 <table>
Note: See TracChangeset
for help on using the changeset viewer.