Ispravka: CSRF polje mora biti _csrf, ne csrf_token (dugmad tiho vraćala 403)

This commit is contained in:
2026-07-01 11:36:43 +02:00
parent e7dcaf4433
commit b5f2742aa9
9 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
{{end}}
<form method="POST" action="{{if .Izmena}}/klijenti/izmeni/{{.Klijent.ID}}{{else}}/klijenti/novi{{end}}">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<div class="forma-kolona">
<!-- tip klijenta -->
+2 -2
View File
@@ -22,7 +22,7 @@
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;">
{{if index .Dozvole "kpo.dodaj"}}
<form method="POST" action="/kpo/backfill" data-full-reload>
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<button type="submit" class="btn-sekundarno" style="font-size:13px;padding:8px 16px;white-space:nowrap;"
data-potvrda="Uvesti sve prodaje i naplaćene servisne naloge koji još nisu u KPO-u?">
Uvezi postojeće
@@ -86,7 +86,7 @@
{{if index $.Dozvole "kpo.obrisi"}}
{{if eq $z.Izvor "rucno"}}
<form method="POST" action="/kpo/obrisi/{{$z.ID}}" style="display:inline;" data-full-reload>
<input type="hidden" name="csrf_token" value="{{$.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{$.CsrfToken}}">
<button type="submit" class="btn-opasno-mali"
data-potvrda="Obrisati ovaj KPO unos?">Obriši</button>
</form>
+1 -1
View File
@@ -15,7 +15,7 @@
<h2 style="margin:0 0 20px;font-size:18px;">Novi KPO unos</h2>
<form method="POST" action="/kpo/nova">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<div class="polje-grupa" style="margin-bottom:16px;">
<label class="polje-labela">Datum prometa *</label>
+1 -1
View File
@@ -189,7 +189,7 @@
</div>
</div>
<form method="POST" action="/nabavke/storno/{{.Nabavka.ID}}" data-full-reload style="display:flex;flex-direction:column;gap:8px;align-items:flex-end;">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<input type="text" name="razlog" placeholder="Razlog storniranja (opciono)" style="width:240px;">
<button type="submit" class="btn-upozorenje"
data-potvrda="Stornirati ovu nabavku? Količine artikala biće vraćene na stanje.">
+1 -1
View File
@@ -27,7 +27,7 @@
Dnevni pazar
</a>
<form method="POST" action="/pdv/kir/backfill-prodaje" data-full-reload>
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<button type="submit" class="btn-sekundarno" style="font-size:13px;padding:8px 16px;white-space:nowrap;"
data-potvrda="Uvesti sve B2B prodaje koje još nisu u KIR-u?">
Uvezi iz prodaje
@@ -81,7 +81,7 @@
{{if gt .Promet.BrojNaloga 0}}
<!-- forma za upis -->
<form method="POST" action="/pdv/kir/dnevni-pazar">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<input type="hidden" name="datum" value="{{.Datum}}">
<input type="hidden" name="osnovica_opsta" value="{{printf "%.2f" .Promet.OsnovicaOpsta}}">
<input type="hidden" name="pdv_opsta" value="{{printf "%.2f" .Promet.PdvOpsta}}">
+1 -1
View File
@@ -23,7 +23,7 @@
<div style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;">
{{if index .Dozvole "pdv.dodaj"}}
<form method="POST" action="/pdv/kpr/backfill-nabavke" data-full-reload>
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<button type="submit" class="btn-sekundarno" style="font-size:13px;padding:8px 16px;white-space:nowrap;"
data-potvrda="Uvesti sve nabavke koje još nisu u KPR-u?">
Uvezi iz nabavki
+1 -1
View File
@@ -237,7 +237,7 @@
<!-- forma -->
<form method="POST" action="/izvestaji/popis">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<div class="kartica animiraj" style="padding:0;overflow:hidden;">
<div style="padding:12px 20px;border-bottom:0.5px solid var(--ivica);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;" class="popis-forma-zaglavlje">
+2 -2
View File
@@ -253,7 +253,7 @@
</div>
</div>
<form method="POST" action="/prodaja/storno/{{.Nalog.ID}}" style="display:flex;flex-direction:column;gap:8px;align-items:flex-end;">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<input type="text" name="razlog" placeholder="Razlog storniranja (opciono)" style="width:240px;">
<button type="submit" class="btn-upozorenje"
data-potvrda="Stornirati nalog {{.Nalog.BrojNaloga}}?">
@@ -295,7 +295,7 @@
</div>
</div>
<form method="POST" action="/prodaja/obrisi/{{.Nalog.ID}}">
<input type="hidden" name="csrf_token" value="{{.CsrfToken}}">
<input type="hidden" name="_csrf" value="{{.CsrfToken}}">
<button type="submit" class="btn-upozorenje"
data-potvrda="Stornirati nalog {{.Nalog.BrojNaloga}}? Količine artikala biće vraćene na stanje.">
Ukloni nalog