Skip to content

A live bird collage card for your Home Assistant dashboard.

Proposal to move success message to js alert (#95)

Alexandre0ab46e363771
diff --git a/scripts/advanced.php b/scripts/advanced.php
index 7ac5fe2c..36d7752c 100644
--- a/scripts/advanced.php
+++ b/scripts/advanced.php
@@ -580,10 +580,9 @@ foreach($formats as $format){
<button onclick="if(<?php print($newconfig['PRIVACY_THRESHOLD']);?> != document.getElementById('privacy_threshold').value){return confirm('This will take about 90 seconds.')} collectrtspUrls();" type="submit" name="submit" value="advanced">
<?php
if(isset($_GET['submit'])){
- echo "Success!";
-} else {
- echo "Update Settings";
+ echo '<script>alert("Settings successfully updated");</script>';
}
+echo "Update Settings";
?>
</button></div>
</form>
diff --git a/scripts/config.php b/scripts/config.php
index ed3117d9..b0d763da 100644
--- a/scripts/config.php
+++ b/scripts/config.php
@@ -723,10 +723,9 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
<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!";
-} else {
- echo "Update Settings";
+ echo '<script>alert("Settings successfully updated");</script>';
}
+echo "Update Settings";
?>
</button></div>
</form>