Skip to content

A live bird collage card for your Home Assistant dashboard.

Config update button

ehpersonal383d5a52423bab
diff --git a/homepage/style.css b/homepage/style.css
index aafb3ba8..61b41098 100644
--- a/homepage/style.css
+++ b/homepage/style.css
@@ -82,6 +82,12 @@ button {
transition:background-color 0.2s;
}
+.disabled{
+ cursor: not-allowed;
+ pointer-events: none;
+ opacity:0.5;
+}
+
button:hover {
color: blue;
}
diff --git a/scripts/config.php b/scripts/config.php
index bd55200f..428df35c 100644
--- a/scripts/config.php
+++ b/scripts/config.php
@@ -117,7 +117,7 @@ if(isset($_GET["latitude"])){
</head>
<div class="settings">
<h2>Basic Settings</h2>
- <form action="" method="GET">
+ <form id="basicform" action="" method="GET">
<?php
if (file_exists('./scripts/thisrun.txt')) {
$config = parse_ini_file('./scripts/thisrun.txt');
@@ -261,7 +261,7 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
<input type="hidden" name="status" value="success">
<input type="hidden" name="submit" value="settings">
- <button type="submit" name="view" value="Settings">
+ <button type="submit" id="basicformsubmit" onclick="if(document.getElementById('basicform').checkValidity()){this.innerHTML = 'Updating... please wait.';this.classList.add('disabled')}" name="view" value="Settings">
<?php
if(isset($_GET['status'])){
echo "Success!";