From c3521f605feaff00b389e0be3c38de2f990e9746 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 2 Oct 2026 06:58:41 +0000 Subject: [PATCH] Pilots tab: drop categories and cred-hint fields Pilots are invite-only and never appear in category-browsable self-service catalogs, so the category checklist served no purpose there. Dropped the login/password hint field too - not requested for pilots. Co-Authored-By: Claude Sonnet 5 --- app/templates/admin.html | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/app/templates/admin.html b/app/templates/admin.html index 5a68c44..91d33ca 100644 --- a/app/templates/admin.html +++ b/app/templates/admin.html @@ -621,7 +621,7 @@
{% for s in pilot_services %} - @@ -716,15 +709,8 @@ -
-
Категории
-
- {% for c in categories %} - - {% endfor %} -
@@ -1339,7 +1325,7 @@ location.reload(); } - function selectPilotService(id, name, slug, target, comment, iconPath, active, svcLogin, svcPassword, svcCredHint) { + function selectPilotService(id, name, slug, target, comment, iconPath, active, svcLogin, svcPassword) { const cfg = parseRdpTarget(target); document.getElementById('p_id').value = id; document.getElementById('p_name').value = name; @@ -1352,9 +1338,7 @@ document.getElementById('p_comment').value = comment || ''; document.getElementById('p_svc_login').value = svcLogin || ''; document.getElementById('p_svc_password').value = svcPassword || ''; - document.getElementById('p_svc_cred_hint').value = svcCredHint || ''; document.getElementById('p_active').value = String(active); - setCategoryChecks('.p_cat', serviceCategoryMap[id] || []); document.getElementById('p_icon_preview').src = iconPath || placeholderIcon; markSelected('.pilot-item', 'data-service-id', id); renderPilotSlots(id); @@ -1371,8 +1355,6 @@ comment: document.getElementById('new_p_comment').value, svc_login: document.getElementById('new_p_svc_login').value, svc_password: document.getElementById('new_p_svc_password').value, - svc_cred_hint: document.getElementById('new_p_svc_cred_hint').value, - category_ids: checkedCategoryIds('.new_p_cat'), active: document.getElementById('new_p_active').value === 'true', is_pilot: true, }); @@ -1391,8 +1373,6 @@ comment: document.getElementById('p_comment').value, svc_login: document.getElementById('p_svc_login').value, svc_password: document.getElementById('p_svc_password').value, - svc_cred_hint: document.getElementById('p_svc_cred_hint').value, - category_ids: checkedCategoryIds('.p_cat'), active: document.getElementById('p_active').value === 'true', is_pilot: true, }); @@ -1400,11 +1380,10 @@ } function clearPilotForm() { - ['p_id','p_name','p_slug','p_target','p_host','p_port','p_domain','p_comment','p_svc_login','p_svc_password','p_svc_cred_hint'].forEach(id => document.getElementById(id).value = ''); + ['p_id','p_name','p_slug','p_target','p_host','p_port','p_domain','p_comment','p_svc_login','p_svc_password'].forEach(id => document.getElementById(id).value = ''); document.getElementById('pilot_slots_box').style.display = 'none'; document.getElementById('p_sec').value = ''; document.getElementById('p_active').value = 'true'; - setCategoryChecks('.p_cat', []); document.getElementById('p_icon_preview').src = placeholderIcon; document.querySelectorAll('.pilot-item').forEach((el) => el.classList.remove('selected-item')); }