deploy / deploy (push) Successful in 9s
Name is now required (it's the only thing identifying what got saved), and printing is an explicit separate choice instead of an implicit side-effect of naming something.
37 lines
1.8 KiB
ERB
37 lines
1.8 KiB
ERB
<form action="/upload" class="dropzone" id="upload-form" method="POST" enctype="multipart/form-data">
|
|
<div class="mb-3">
|
|
<label for="formFile" class="form-label">Upload .pdf or .zpl to print label</label>
|
|
<input name="file" class="form-control" type="file" id="formFile" accept=".pdf,.zpl" />
|
|
</div>
|
|
<button class="btn btn-secondary" type="submit">Upload</button>
|
|
</form>
|
|
|
|
<form action="/test-print" method="POST" class="mt-3">
|
|
<button class="btn btn-outline-secondary" type="submit">Print test label</button>
|
|
</form>
|
|
|
|
<hr class="mt-4">
|
|
|
|
<h5>Free text ZPL</h5>
|
|
<p>
|
|
<a href="https://labelary.com/viewer.html" target="_blank" rel="noopener noreferrer">Labelary ZPL viewer</a>
|
|
(preview/build ZPL before pasting it here)
|
|
</p>
|
|
<form action="/shipping/zpl" method="POST">
|
|
<div class="mb-3">
|
|
<textarea name="zpl" class="form-control" rows="8" placeholder="^XA...^XZ" style="font-family: monospace;"></textarea>
|
|
</div>
|
|
<div class="row g-2 align-items-end">
|
|
<div class="col-auto">
|
|
<label for="save_as_zpl" class="form-label">Name</label>
|
|
<input name="save_as" class="form-control" type="text" id="save_as_zpl" placeholder="label name" required />
|
|
</div>
|
|
<div class="col-auto">
|
|
<button class="btn btn-outline-secondary" type="submit" name="commit" value="save">Save</button>
|
|
<button class="btn btn-secondary" type="submit" name="commit" value="save_and_print">Save & Print</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<p class="mt-4"><a href="/labels">See saved labels →</a></p>
|