templates/cluster/edit.html (31 lines of code) (raw):

{{ define "cluster/edit.html" }} {{template "header" .}} <div id="template-args" style="display: none;" data-args="{{ .templateArgs }}"></div> <div id="app"></div> {{template "scripts" .}} <script src="{{ .BasePath }}/static/js/mustache.js"></script> <script type="text/javascript" src="{{ .BasePath }}/static/js/axios.min.js"></script> <script id="ini-template" type="x-tmpl-mustache"> {{ .hwINITemplateContent }} </script> <script id="allowed-keys-template" type="x-tmpl-mustache"> <div class="allowed-keys-row"> <input name="allowed-keys-issuer[]" class="allowed-keys-input allowed-keys-issuer" required aria-label="key issuer" placeholder="Емітент ключа" type="text" /> <input name="allowed-keys-serial[]" class="allowed-keys-input allowed-keys-serial" required aria-label="key serial" placeholder="Серійний номер ключа" type="text" /> <button class="allowed-keys-remove-btn">-</button> </div> </script> <script type="text/javascript"> $(function (){ $("input").on('change invalid', function(){ let input = $(this).get(0); input.setCustomValidity(''); if (!input.validity.valid) { input.scrollIntoView(); input.setCustomValidity('Не може бути порожнім'); } }); }); </script> {{template "footer" .}} {{ end }}