Added 'supply' page to create negative register transactions, updated translation
This commit is contained in:
parent
80b407069d
commit
86ea7c0000
10 changed files with 278 additions and 68 deletions
61
application/app/templates/supply.html
Normal file
61
application/app/templates/supply.html
Normal file
|
@ -0,0 +1,61 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load l10n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Supply" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/supply.css">
|
||||
<link rel="stylesheet" href="/static/css/customNumberInput.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% translate "Supply" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if user.is_superuser or user.allowed_to_supply %}
|
||||
|
||||
<form id="supplyForm">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Description" %}:</div>
|
||||
<input type="text" name="supplyDescription" id="supplyDescription" autofocus>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Price" %} ({{ currency_suffix }}):</div>
|
||||
<div class="column">
|
||||
<input type="number" name="supplyPrice" id="supplyPrice" max="9999.99" min="1.00" step="0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="statusInfo"></div>
|
||||
|
||||
<div class="horizontalButtonList">
|
||||
<a href="/" class="button">{% translate "cancel" %}</a>
|
||||
<input type="submit" id="supplySubmitBtn" class="button" value='{% translate "submit" %}'>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script src="/static/js/supply.js"></script>
|
||||
<script src="/static/js/customNumberInput.js"></script>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="centeringFlex">
|
||||
<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 %}
|
|
@ -32,6 +32,9 @@
|
|||
{% if user.is_superuser or user.is_staff %}
|
||||
<a class="button dropDownChoice" href="/admin/">Admin Panel</a>
|
||||
{% endif %}
|
||||
{% if user.is_superuser or user.allowed_to_supply %}
|
||||
<a class="button dropDownChoice" href="/supply/">{% translate "Supply" %}</a>
|
||||
{% endif %}
|
||||
<a class="button dropDownChoice" href="/accounts/password_change/">{% translate "Change Password" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue