Preis-Eingabe auf europäisches Komma-Format normalisiert
- Neuer Artikel: Textfeld mit Placeholder 4,50 statt Dezimalpunkt - Artikel bearbeiten: Preise mit Komma anzeigen und akzeptieren - Backend: Komma vor float()-Konvertierung in Punkt umwandeln Made-with: Cursor
This commit is contained in:
@@ -45,8 +45,8 @@
|
||||
<td class="align-middle">{{ pos }}</td>
|
||||
<td><input type="text" class="form-control" name="name_{{ pos }}" value="{{ prod['name'] }}"
|
||||
required></td>
|
||||
<td><input type="number" step="0.01" class="form-control" name="price_{{ pos }}"
|
||||
value="{{ prod['price'] }}" required></td>
|
||||
<td><input type="text" inputmode="decimal" class="form-control" name="price_{{ pos }}"
|
||||
value="{{ '{:.2f}'.format(prod['price']).replace('.', ',') }}" required></td>
|
||||
<td><input type="text" class="form-control" name="icon_{{ pos }}" value="{{ prod['icon'] }}"
|
||||
required></td>
|
||||
<td>
|
||||
@@ -100,8 +100,8 @@
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="add_price">Preis (€)</label>
|
||||
<input type="number" step="0.01" class="form-control" name="add_price" id="add_price" required
|
||||
placeholder="4.50">
|
||||
<input type="text" inputmode="decimal" class="form-control" name="add_price" id="add_price" required
|
||||
placeholder="4,50">
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
<label for="add_icon">Icon</label>
|
||||
|
||||
Reference in New Issue
Block a user