Skip to content

A live bird collage card for your Home Assistant dashboard.

make advanced setting page behave a bit more as the basic settings page

frederikeb7d7abebf05
diff --git a/scripts/advanced.php b/scripts/advanced.php
index 36d7752c..07461355 100644
--- a/scripts/advanced.php
+++ b/scripts/advanced.php
@@ -252,7 +252,7 @@ $count = $count_labels;
$newconfig = get_config();
?>
<div class="brbanner"><h1>Advanced Settings</h1></div><br>
- <form action="" method="GET">
+ <form id="advancedform" action="" method="GET">
<table class="settingstable"><tr><td>
<h2>Privacy Threshold</h2>
<div class="slidecontainer">
@@ -577,7 +577,7 @@ foreach($formats as $format){
<br><br>
<input type="hidden" name="view" value="Advanced">
<div class="float">
- <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">
+ <button type="submit" id="advancedformsubmit" onclick="if(document.getElementById('advancedform').checkValidity()){this.innerHTML = 'Updating... please wait.';this.classList.add('disabled')}" name="submit" value="advanced">
<?php
if(isset($_GET['submit'])){
echo '<script>alert("Settings successfully updated");</script>';