Тест DEPO: строки бумаг — список из кода (slice в шаблоне ломал форму)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -363,9 +363,10 @@ func registerDepoTest(mux *http.ServeMux, a *admin) {
|
|||||||
DB string
|
DB string
|
||||||
JobMode string
|
JobMode string
|
||||||
Flash string
|
Flash string
|
||||||
|
Rows []string
|
||||||
}{nowPage("Тестирование DEPO", "depotest"), clients, secs, parts, codes,
|
}{nowPage("Тестирование DEPO", "depotest"), clients, secs, parts, codes,
|
||||||
append([]struct{ Code, Title string }(nil), depoTestOutcomes...), runs, running,
|
append([]struct{ Code, Title string }(nil), depoTestOutcomes...), runs, running,
|
||||||
fs.Server + " / " + fs.DepoDB(), fs.DepoJobMode, r.URL.Query().Get("flash")}
|
fs.Server + " / " + fs.DepoDB(), fs.DepoJobMode, r.URL.Query().Get("flash"), []string{"1", "2", "3", "4", "5"}}
|
||||||
render(w, a.depoTest, data)
|
render(w, a.depoTest, data)
|
||||||
})
|
})
|
||||||
mux.HandleFunc("/admin/depo-test/run", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/admin/depo-test/run", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<div class="dt-lines">
|
<div class="dt-lines">
|
||||||
<label>Бумага (ISIN)</label><label>Кол-во</label><label>Исход (ответ НРД)</label><label>Код отказа (для «отказ по M2M»)</label>
|
<label>Бумага (ISIN)</label><label>Кол-во</label><label>Исход (ответ НРД)</label><label>Код отказа (для «отказ по M2M»)</label>
|
||||||
{{$o := .Outcomes}}{{$c := .Codes}}
|
{{$o := .Outcomes}}{{$c := .Codes}}
|
||||||
{{range $i, $n := (slice "1" "2" "3" "4" "5")}}
|
{{range $n := .Rows}}
|
||||||
<input name="isin{{$n}}" list="dt-secs" placeholder="{{if eq $n "1"}}RU0009029540{{else}}— не обязательно —{{end}}" {{if eq $n "1"}}value="RU0009029540"{{end}}>
|
<input name="isin{{$n}}" list="dt-secs" placeholder="{{if eq $n "1"}}RU0009029540{{else}}— не обязательно —{{end}}" {{if eq $n "1"}}value="RU0009029540"{{end}}>
|
||||||
<input name="qty{{$n}}" value="1" inputmode="decimal">
|
<input name="qty{{$n}}" value="1" inputmode="decimal">
|
||||||
<select name="out{{$n}}">{{range $o}}<option value="{{.Code}}">{{.Title}}</option>{{end}}</select>
|
<select name="out{{$n}}">{{range $o}}<option value="{{.Code}}">{{.Title}}</option>{{end}}</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user