Files
webgui/plugins/dynamix.my.servers/MyServers.page
T
2021-05-12 17:17:15 -07:00

53 lines
1.8 KiB
Plaintext

Menu="ManagementAccess:100"
Title="My Servers"
Icon="icon-u-globe"
Tag="globe"
---
<?PHP
/* Copyright 2005-2018, Lime Technology
* Copyright 2012-2018, 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,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<script>
$('body').on('change keyup', '#UnraidNetSettings', function(data) {
$(this).find('.applyBtn').removeAttr('disabled');
});
function applyCrashInfoSetting(button) {
$(button).prop("disabled", true).html("_(Applying)_ <i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i>");
var oldlabel = $.trim($(button).text());
$.post( "ajax/test.html", function( data ) {
$( ".result" ).html( data );
});
$.post('/webGui/include/Dispatcher.php',{
"#cfg": "/boot/config/plugins/dynamix.my.servers/myservers.cfg",
"remote_sendCrashInfo": $('#sendCrashInfo').val(),
}, function() {
$(button).html(oldlabel);
}).fail(function() {
$(button).prop("disabled", false).html(oldlabel).after( "<p>_(Sorry, an error occurred)_</p>" );
});
}
</script>
<form id="UnraidNetSettings" markdown="1" name="UnraidNetSettings" method="POST" action="/update.htm" target="progressFrame">
_(Unraid.net account status)_:
: <unraid-authed prop-registered="<? echo $isRegistered ?>"></unraid-authed>
_(Send crash information to Unraid developers)_:
: <select id="sendCrashInfo" size="1">
<?=mk_option($remote['sendCrashInfo'], "no", _("No"))?>
<?=mk_option($remote['sendCrashInfo'], "yes", _("Yes"))?>
</select>
&nbsp;
: <button class="applyBtn" type="button" onclick="applyCrashInfoSetting(this)" disabled="disabled">_(Apply)_</button>
</form>