new shedule block work

This commit is contained in:
Sundog Jones 2024-10-22 10:01:54 -04:00
parent fc4cba8993
commit 4d5da2dfac
2 changed files with 14 additions and 1 deletions

11
block.php Normal file
View File

@ -0,0 +1,11 @@
<?php
$db = new SQLite3('netv-mam.sqlite');
if (isset($_POST['id'])) {
header("Content-Type: application/json");
echo('{"ok": true}');
exit();
}
?>

View File

@ -328,9 +328,10 @@
<p>Tag(s) for block:</p>
<div id="new_block_program_tags"></div>
<p><label for="new_block_program_selector">Select program by </label><select id="new_block_program_selector">
<option value="newest">newest in tag</option>
<option value="newest" selected>newest in tag</option>
<option value="random">random (least played in tag)</option>
</select></p>
<p><label for="new_block_allow_reruns">Allow reruns: </label><input name="new_block_allow_reruns" id="new_block_allow_reruns" type="checkbox" checked /></p>
<p><label for="new_block_duration_minutes">Block duration (in minutes): </label><input name="new_block_duration_minutes" id="new_block_duration_minutes" type="number" /></p>
<p><label for="new_block_enable_commercials">Play commercials: </label><input name="new_block_enable_commercials" id="new_block_enable_commercials" type="checkbox" checked /></p>
<p>Tag(s) for commercials:</p>
@ -895,6 +896,7 @@
event.preventDefault();
const updateURL = "block.php";
let data = new FormData(document.getElementById("new_block_dialog_form"));
data.set("id", new_block_dialog_id.value);
console.log("new block:");
console.dir(data);
fetch(updateURL, {