Power off VMs after a Javascript popup.
authorEvan Broder <broder@mit.edu>
Thu, 5 Mar 2009 22:13:42 +0000 (17:13 -0500)
committerEvan Broder <broder@mit.edu>
Thu, 5 Mar 2009 22:13:42 +0000 (17:13 -0500)
svn path=/trunk/packages/invirt-web/; revision=2238

code/templates/list.tmpl

index 7c8e5d1..8a0231e 100644 (file)
@@ -124,7 +124,11 @@ $helppopup('Windows')#slurp
 #if $machine.uptime then 'on' else 'off'
 " name="action" value="#slurp
 #if $machine.uptime then 'Power off' else 'Power on'
 #if $machine.uptime then 'on' else 'off'
 " name="action" value="#slurp
 #if $machine.uptime then 'Power off' else 'Power on'
-"/>
+"#slurp
+#if $machine.uptime
+ onclick="return confirm('Are you sure you want to power off this VM?');"
+#end if
+/>
          </form>
        </td>
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
          </form>
        </td>
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>