Ключ: не переспрашивать контур, если он выбран в мастере
Если контур НРД уже выбран в мастере (WantContour), на шаге «использовать ключ с флешки» показываем его фиксированно («Боевой — выбран в мастере») с кнопкой «Изменить», а не радио-вопросом заново. При расхождении с контуром по сертификату — предупреждение. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7eREaYwUt1i4fNLZcGnjn
This commit is contained in:
@@ -137,9 +137,13 @@
|
||||
onsubmit="this.querySelector('button[type=submit]').disabled=true;this.querySelector('button[type=submit]').textContent='Подключаю… (до пары минут)';">
|
||||
{{template "keyWizRet" .}}
|
||||
<input type="hidden" name="as_is" value="1">
|
||||
<div>
|
||||
<label style="font-weight:600;display:block;margin-bottom:6px">Для какого контура НРД этот ключ</label>
|
||||
{{$c := .SuggestContour}}{{if not $c}}{{$c = .WantContour}}{{end}}{{if not $c}}{{$c = currentContour}}{{end}}
|
||||
{{$c := .SuggestContour}}{{if not $c}}{{$c = .WantContour}}{{end}}{{if not $c}}{{$c = currentContour}}{{end}}
|
||||
{{if .WantContour}}
|
||||
<p class="kw-contour-sum" style="margin:0">Контур НРД: <b>{{if eq .WantContour "prod"}}Боевой{{else}}Тестовый TEST3{{end}}</b> <span class="muted" style="font-size:12px">— выбран в мастере</span>{{if and .SuggestContour (ne .SuggestContour .WantContour)}}<br><span style="color:var(--warn);font-size:12px">⚠ по сертификату ключ похож на {{if eq .SuggestContour "test3"}}тестовый{{else}}боевой{{end}} — проверьте выбор</span>{{end}}
|
||||
<button type="button" class="kw-link" style="margin-left:8px" onclick="this.closest('form').querySelector('.kw-contour-pick').hidden=false;this.closest('.kw-contour-sum').hidden=true">Изменить</button></p>
|
||||
{{end}}
|
||||
<div class="kw-contour-pick"{{if .WantContour}} hidden{{end}}>
|
||||
{{if not .WantContour}}<label style="font-weight:600;display:block;margin-bottom:6px">Для какого контура НРД этот ключ</label>{{end}}
|
||||
{{if .SuggestIssuer}}<p class="muted" style="font-size:12px;margin:0 0 4px">Сертификат от «{{.SuggestIssuer}}» — это {{if eq .SuggestContour "test3"}}тестовый{{else}}боевой{{end}} контур.</p>{{end}}
|
||||
<label style="display:flex;gap:8px;align-items:center;font-weight:400"><input type="radio" name="contour" value="test3" style="width:auto" {{if ne $c "prod"}}checked{{end}}> Тестовый TEST3</label>
|
||||
<label style="display:flex;gap:8px;align-items:center;font-weight:400"><input type="radio" name="contour" value="prod" style="width:auto" {{if eq $c "prod"}}checked{{end}}> Боевой</label>
|
||||
|
||||
Reference in New Issue
Block a user