Add some options for the build order settings page

- Not editable yet
This commit is contained in:
Oliver Walters 2020-10-20 00:24:33 +11:00
parent a5639c380f
commit e8a0095e50
2 changed files with 19 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def inventree_docs_url(*args, **kwargs):
@register.simple_tag()
def inventree_setting(key, *args, **kwargs):
return InvenTreeSetting.get_setting(key)
return InvenTreeSetting.get_setting(key, backup_value=kwargs.get('backup', None))
@register.simple_tag()

View File

@ -1,5 +1,6 @@
{% extends "InvenTree/settings/settings.html" %}
{% load i18n %}
{% load inventree_extras %}
{% block tabs %}
{% include "InvenTree/settings/tabs.html" with tab='build' %}
@ -11,4 +12,21 @@
{% block settings %}
<table class='table table-striped table-condensed'>
<thead></thead>
<tbody>
<tr>
<th>{% trans "Reference Prefix" %}</th>
<th>{% inventree_setting 'buildorder_reference_prefix' backup='PO' %}</th>
<td>{% trans "Prefix for Build Order reference" %}</td>
</tr>
<tr>
<th>{% trans "Reference Regex" %}</th>
<th>{% inventree_setting 'buildorder_reference_regex' %}</th>
<td>{% trans "Regex validator for Build Order reference" %}</td>
<td></td>
</tr>
</tbody>
</table>
{% endblock %}