Ignore:
Timestamp:
Oct 20, 2007, 10:14:51 AM (17 years ago)
Author:
ecprice
Message:

Removed the Javascript, since I realized that

  • The way it was was worthless
  • The architecture has serious trouble supporting useful js
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/info.tmpl

    r205 r207  
    1616
    1717#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: replaceFunc
    25   });
    26   return false;
    27 }
    28 </script>
    2918<form action="command" action="POST">
     19  <input type="hidden" name="back" value="info"/>
    3020  <input type="hidden" name="machine_id" value="$machine.machine_id"/>
    3121  <table>
     
    4434      <tr>
    4535        #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>
    4939        #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>
    5141        #end if
    5242      <td>Boot CD:</td>
     
    7060#end if
    7161</p>
    72 <form action="modify" method="POST" onsubmit="return jsFormSubmit('modify', this);">
     62<form action="modify" method="POST">
    7363  <input type="hidden" name="machine_id" value="$defaults.machine_id"/>
    7464  <table>
Note: See TracChangeset for help on using the changeset viewer.