diff --git a/templates/edit_post.html b/templates/edit_post.html index 1594b8a..841eead 100644 --- a/templates/edit_post.html +++ b/templates/edit_post.html @@ -42,35 +42,48 @@
- -
- - -
Короткое имя поста (максимум 100 символов)
+ +
+
+ +
+
+ +
- - -
Выберите площадку из списка доступных
+
+
+ +
+
+ +
+
-
+
- +
- - -
Числовой идентификатор поста во ВКонтакте
+
+
+ +
+
+ +
+
@@ -266,6 +279,16 @@ } }); + // Валидация поля названия + const shortnameInput = document.getElementById('shortname'); + shortnameInput.addEventListener('input', () => { + const value = shortnameInput.value; + if (value.length > 100) { + alert('Название не может превышать 100 символов'); + shortnameInput.value = value.substring(0, 100); + } + }); + // Загрузка списка площадок loadVenues();