Implementation of the switch between Anzahl oder Code
Release Inventarsystem / release-docker (push) Successful in 3m7s
Release Inventarsystem / release-docker (push) Successful in 3m7s
This commit is contained in:
@@ -3418,14 +3418,24 @@ document.addEventListener('DOMContentLoaded', ()=>{
|
|||||||
`<form method="POST" action="{{ url_for('ausleihen', id='') }}${item._id}">
|
`<form method="POST" action="{{ url_for('ausleihen', id='') }}${item._id}">
|
||||||
${isGroupedItem ? `
|
${isGroupedItem ? `
|
||||||
<div class="grouped-borrow-controls" style="display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; align-items:center;">
|
<div class="grouped-borrow-controls" style="display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; align-items:center;">
|
||||||
<label style="font-size:0.85rem; margin:0;">Anzahl:</label>
|
<label style="font-size:0.85rem; margin:0;">Anzahl:</label>
|
||||||
<input type="number" name="exemplare_count" min="1" max="${availableGroupedCount}" value="1" style="width:74px; padding:4px;">
|
<input type="number"
|
||||||
<label style="font-size:0.85rem; margin:0;">oder Code:</label>
|
name="exemplare_count"
|
||||||
<select id="specific-item-card-${item._id}" name="specific_item_id" style="max-width:190px; padding:4px;">
|
min="1"
|
||||||
<option value="">Automatisch wählen</option>
|
max="${availableGroupedCount}"
|
||||||
${groupedAvailableUnits.map(unit => `<option value="${unit.id}">${unit.code}</option>`).join('')}
|
value="1"
|
||||||
</select>
|
style="width:74px; padding:4px;"
|
||||||
</div>` : ''}
|
oninput="if(this.value){ this.form.querySelector('[name=specific_item_id]').value = ''; }">
|
||||||
|
|
||||||
|
<label style="font-size:0.85rem; margin:0;">oder Code:</label>
|
||||||
|
<select id="specific-item-card-${item._id}"
|
||||||
|
name="specific_item_id"
|
||||||
|
style="max-width:190px; padding:4px;"
|
||||||
|
onchange="if(this.value !== ''){ this.form.querySelector('[name=exemplare_count]').value = '1'; }">
|
||||||
|
<option value="">Automatisch wählen</option>
|
||||||
|
${groupedAvailableUnits.map(unit => `<option value="${unit.id}">${unit.code}</option>`).join('')}
|
||||||
|
</select>
|
||||||
|
</div>` : ''}
|
||||||
<button class="ausleihen" type="submit">Ausleihen</button>
|
<button class="ausleihen" type="submit">Ausleihen</button>
|
||||||
</form>`
|
</form>`
|
||||||
: isBorrowedByMe ?
|
: isBorrowedByMe ?
|
||||||
|
|||||||
Reference in New Issue
Block a user