42 lines
No EOL
1.4 KiB
HTML
42 lines
No EOL
1.4 KiB
HTML
{% extends "baselayout.html" %}
|
|
|
|
{% load i18n %}
|
|
{% load l10n %}
|
|
|
|
{% block title %}
|
|
{% translate "Drinks - Supply" %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if user.is_superuser or user.allowed_to_supply %}
|
|
<form id="customform" class="flex flex-column flex-center appform gap-1rem" action="/api/supply">
|
|
{% csrf_token %}
|
|
<h1 class="formheading">{% translate "Supply" %}</h1>
|
|
<div class="flex forminput">
|
|
<span>{% translate "Description" %}:</span>
|
|
<span>
|
|
<input type="text" name="supplydescription" autofocus required>
|
|
</span>
|
|
</div>
|
|
<div class="flex forminput">
|
|
<span>{% translate "Price" %} ({{ currency_suffix }}):</span>
|
|
<span>
|
|
<input type="number" name="supplyprice" max="9999.99" min="1.00" step="0.01" required>
|
|
</span>
|
|
</div>
|
|
<div id="statusinfo"></div>
|
|
<div class="buttons">
|
|
<a href="/" class="button">{% translate "cancel" %}</a>
|
|
<input type="submit" id="submitbtn" class="button" value='{% translate "submit" %}'>
|
|
</div>
|
|
</form>
|
|
<script src="/static/js/custom_form.js"></script>
|
|
<script src="/static/js/custom_number_input.js"></script>
|
|
{% else %}
|
|
<div class="flex flex-center">
|
|
<p>{% translate "You are not allowed to view this site." %}</p>
|
|
<a href="/">{% translate "back" %}</a>
|
|
</div>
|
|
{% endif %}
|
|
<script src="/static/js/autoreload.js"></script>
|
|
{% endblock %} |