Less confusing "Print labels" button + explanation

This commit is contained in:
radex 2020-05-20 23:43:42 +02:00 committed by Piotr Dobrowolski
parent 5160052dfd
commit 1f5a053a19
1 changed files with 24 additions and 11 deletions

View File

@ -9,8 +9,6 @@
<li class="active">{{ item.name }}</li> <li class="active">{{ item.name }}</li>
</ol> </ol>
<h2> <h2>
<small class="pull-right"><a href="{% url 'admin:storage_item_change' item.pk %}"><span class="glyphicon glyphicon-pencil"></span></a></small>
{% include "widgets/categoryicon.html" with category=item.primary_category %} {% include "widgets/categoryicon.html" with category=item.primary_category %}
{{ item.name }} {{ item.name }}
</h2> </h2>
@ -18,15 +16,30 @@
<div class="col-md-4"> <div class="col-md-4">
<iframe name="printframe" style="display: none"></iframe> <iframe name="printframe" style="display: none"></iframe>
<div class="label-item">
<form action="/api/1/items/{{ item.short_id }}/print/?quantity=2" method="POST" target="printframe" onsubmit="return confirm('Want to print 2 labels?')" style="display:inline-block"> <div class="btn-group" role="group" style="margin-bottom: 10px">
<div class="btn-group">
<button type="button" class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="glyphicon glyphicon-print"></i>&nbsp;&nbsp;Print labels <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><div style="padding: 5px 10px">Put one label in front, one on the back!</div></li>
<li role="separator" class="divider"></li>
<li style="padding: 5px 10px">
<form action="/api/1/items/{{ item.short_id }}/print/?quantity=2" method="POST" target="printframe" style="display:inline-block">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-default btn-lg btn-primary"><i class="glyphicon glyphicon-print"></i>&nbsp;&nbsp;PRINT&nbsp;x&nbsp;2</button> <button class="btn btn-default btn-lg">Print 2 labels (recommended)</button>
</form> </form>
<form action="/api/1/items/{{ item.short_id }}/print/" method="POST" target="printframe" onsubmit="return confirm('Want to print this labels?')" style="display:inline-block"> </li>
<li style="padding: 5px 10px">
<form action="/api/1/items/{{ item.short_id }}/print/" method="POST" target="printframe" style="display:inline-block">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-default btn-lg"><i class="glyphicon glyphicon-print"></i></button> <button class="btn btn-default btn-lg">Print 1 label</button>
</form> </form>
</li>
</ul>
</div>
<a href="{% url 'admin:storage_item_change' item.pk %}" class="btn btn-default">Edit</a>
</div> </div>
<table class="table table-hover table-striped"> <table class="table table-hover table-striped">