Changed Delete keyfile button placement

This commit is contained in:
bergware
2020-01-15 09:37:54 +01:00
parent adab0b6ce3
commit 34644f536c

View File

@@ -3,8 +3,8 @@ Title="Array Operation"
Tag="snowflake-o"
---
<?PHP
/* Copyright 2005-2019, Lime Technology
* Copyright 2012-2019, Bergware International.
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -258,7 +258,7 @@ $(function(){
if (form.input !== undefined) selectInput(form);
});
function formatWarning(val) {
if (val==true)
if (val==true)
swal({
title: 'Format Unmountable disks',
text: 'Create an empty file system on the disks shown as <b>Unmountable</b> discarding all data currently on the disks and update parity to reflect this. '
@@ -487,6 +487,17 @@ function formatWarning(val) {
</table>
</form>
<?if ($var['fsState']=="Started"):?>
<?if ($keyfile):?>
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#file" value="unused">
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
<table class="array_status noshift">
<tr><td></td><td><input type="submit" name="#apply" value="Delete" disabled></td><td><strong>Delete</strong> will delete the encryption keyfile.
<br><input type="checkbox" onchange="toggleApply(this.checked)"><small>Yes I want to do this</small></td></tr>
<tr><td></td><td class="line" colspan="2"></td></tr>
</table>
</form>
<?endif;?><!-- markdown fix -->
<table class="array_status noshift">
<tr><td></td><td><input type="button" id="button-down" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('down')" value="Spin Down"<?=$parity?' disabled':''?>><input type="button" id="button-up" onclick="$('[id^=button-]').prop('disabled',true);toggle_state('up')" value="Spin Up"<?=$parity?' disabled':''?>></td>
<td><strong>Spin Down</strong> will immediately spin down all disks.<br><strong>Spin Up</strong> will immediately spin up all disks.</td></tr>
@@ -506,7 +517,16 @@ function formatWarning(val) {
</table>
</form>
<?endif;?>
<?endif;?>
<?elseif ($wrong && $keyfile):?>
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#file" value="unused">
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
<table class="array_status noshift">
<tr><td></td><td><input type="submit" name="#apply" value="Delete"></td><td><strong>Delete</strong> will delete the encryption keyfile.</td></tr>
<tr><td></td><td class="line" colspan="2"></td></tr>
</table>
</form>
<?endif;?><!-- markdown fix -->
<form name="shutdownOps" method="POST" action="/webGui/include/Boot.php">
<table class="array_status noshift">
<tr><td></td><td><input type="button" name="reboot" value="Reboot" onclick="shutdown_now(this.form,'reboot')"><input type="button" name="shutdown" value="Power down" onclick="shutdown_now(this.form,'shutdown')"></td>
@@ -514,19 +534,7 @@ function formatWarning(val) {
<tr><td></td><td class="line" colspan="2"></td></tr>
</table>
</form>
<?if ($keyfile):?>
<form name="delete_keyfile" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#file" value="unused">
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
<table class="array_status noshift">
<tr><td></td><td><input type="submit" name="#apply" value="Delete" disabled></td><td><strong>Delete</strong> will delete the encryption keyfile.
<br><input type="checkbox" onchange="toggleApply(this.checked)"><small>Yes I want to do this</small></td></tr>
</table>
</form>
<?endif;?>
<?
if (isset($display['sleep'])) @include $display['sleep'];
?>
<!-- markdown fix --></p><?if (isset($display['sleep'])) @include $display['sleep'];?>
<?if ($btrfs):?>
<script>
function enable_stop() {