label_printer/flask/templates/text.html

51 lines
1.7 KiB
HTML
Raw Normal View History

2024-09-14 18:49:57 +00:00
{% extends "base.html" %}
{% block content %}
<form method="POST" action="/text-template">
<label for="template">Template:</label>
<select name="template">
<option value="DNH">Do not hack</option>
<option value="Food">Food</option>
</select>
<input type="submit" value="Apply">
</form>
<form method="POST" action="/text-form">
<h2>String 1</h2>
Text:</span> <input type="text" value="{{text1["string"]}}" name="string1"><br>
Size: <input type="number" value="{{text1["size"]}}" name="size1" min="0" required
style="width: 40px"><br>
Y position: <input type="number" value="{{text1["pos"]}}" name="pos1" required
style="width: 40px"><br>
<h2>String 2</h2>
Text: <input type="text" value="{{text2["string"]}}" name="string2"><br>
Size: <input type="number" value="{{text2["size"]}}" name="size2" min="0" required
style="width: 40px"><br>
Y position: <input type="number" value="{{text2["pos"]}}" name="pos2" required
style="width: 40px"><br>
<input type="submit" value="Submit">
</form>
{% if filename %}
<br><br>
<img style="border: 1px solid blueviolet;"
src="{{ url_for('generated_file', filename=filename) }}" alt="Uploaded Image">
<form method="POST" action="/text-print">
{% if cut %}
<input type="checkbox" name="cut" value="cut" checked>
{%else %}
<input type="checkbox" name="cut" value="cut">
{%endif%}
<label for="cut"> Cut paper after printing </label><br>
<input type="submit" value="Print">
</form>
{% endif %}
{% endblock %}