Merge branch 'main' into transparency
This commit is contained in:
commit
bedfbce3a4
63
index.php
63
index.php
|
@ -31,7 +31,7 @@
|
||||||
{
|
{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
input[type=file]
|
input[type=file], input[list=list_tags], input[type=url]
|
||||||
{
|
{
|
||||||
margin-left: 10ch;
|
margin-left: 10ch;
|
||||||
}
|
}
|
||||||
|
@ -236,21 +236,20 @@
|
||||||
don't want trust to be necessary to use this list.
|
don't want trust to be necessary to use this list.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="post" action="/add" enctype="multipart/form-data">
|
<form method="post" action="/add" enctype="multipart/form-data" id="form_add">
|
||||||
<label for="instance">Instance:</label>
|
<label for="instance">Instance:</label>
|
||||||
<input type="text" id="instance" name="instance" placeholder="example.com" required>
|
<input type="text" id="instance" name="instance" placeholder="example.com" required>
|
||||||
<span class="hint">(Without the “https://”)</span>
|
<span class="hint">(Without the “https://”)</span>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<label for="tags">Tags:</label>
|
<label for="tags">Tags:</label><span class="hint">(One tag per field or comma separated)</span><br>
|
||||||
<input type="text" id="tags" name="tags" placeholder="tag1,tag2" autocomplete="on" required>
|
<input type="text" list="list_tags" id="tags" name="tags[]" required>
|
||||||
<!-- <input type="button" id="add_tag" value="➕" disabled> -->
|
<input type="button" id="add_tag" value="➕" title="Add tag" onclick="javascript:add_input_tag();">
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<label for="receipts">Receipts:</label>
|
<label for="receipts">Receipts:</label><span class="hint">(One receipt per field or comma separated)</span><br>
|
||||||
<input type="url" id="receipts" name="receipts"
|
<input type="url" id="receipts" name="receipts[]" required>
|
||||||
placeholder="https://example.com/@user/1234567890,https://example.com/about/more" required>
|
<input type="button" id="add_receipt" value="➕" title="Add receipt" onclick="javascript:add_input_receipt();">
|
||||||
<!-- <input type="button" id="add_receipt" value="➕" disabled> -->
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<label for="screenshot1">Screenshots:</label><span class="hint">(optional)</span>
|
<label for="screenshot1">Screenshots:</label><span class="hint">(optional)</span>
|
||||||
|
@ -299,5 +298,51 @@
|
||||||
<a href="https://schlomp.space/FediBlock">Sourcecode</a> licensed under the
|
<a href="https://schlomp.space/FediBlock">Sourcecode</a> licensed under the
|
||||||
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0-only</a>.
|
<a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0-only</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function add_input_tag()
|
||||||
|
{
|
||||||
|
const input_text = document.createElement("input");
|
||||||
|
input_text.setAttribute("type", "text");
|
||||||
|
input_text.setAttribute("list", "list_tags");
|
||||||
|
input_text.setAttribute("name", "tags[]");
|
||||||
|
|
||||||
|
const form = document.getElementById("form_add");
|
||||||
|
const btn = document.getElementById("add_tag");
|
||||||
|
form.insertBefore(document.createElement("br"), btn);
|
||||||
|
form.insertBefore(input_text, btn);
|
||||||
|
input_text.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function add_input_receipt()
|
||||||
|
{
|
||||||
|
const input_text = document.createElement("input");
|
||||||
|
input_text.setAttribute("type", "url");
|
||||||
|
input_text.setAttribute("name", "receipts[]");
|
||||||
|
|
||||||
|
const form = document.getElementById("form_add");
|
||||||
|
const btn = document.getElementById("add_receipt");
|
||||||
|
form.insertBefore(document.createElement("br"), btn);
|
||||||
|
form.insertBefore(input_text, btn);
|
||||||
|
input_text.focus();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<datalist id="list_tags">
|
||||||
|
<?php
|
||||||
|
if ($file = fopen("tags.lst", "r"))
|
||||||
|
{
|
||||||
|
while(!feof($file))
|
||||||
|
{
|
||||||
|
$tag = rtrim(fgets($file));
|
||||||
|
if ($tag != "")
|
||||||
|
{
|
||||||
|
printf("<option value=\"%s\">\n", $tag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose($file);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</datalist>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Reference in New Issue
Block a user