From a8f9e403c8ef789f25f75625908dbb184431252e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 17 Feb 2021 14:30:36 +0100 Subject: Added comment maxlength --- profile/public/user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'profile/public/user.js') diff --git a/profile/public/user.js b/profile/public/user.js index 141ba54..dbceafc 100644 --- a/profile/public/user.js +++ b/profile/public/user.js @@ -96,8 +96,9 @@ async function addComments(comments) { const inputDiv = document.createElement("div"); const input = document.createElement("textarea"); - input.placeholder = "Dein Kommentar..."; + input.placeholder = "Dein Kommentar (max. 280 Zeichen)"; input.value = comment.comment; + input.maxLength = 280; const submit = document.createElement("input"); submit.type = "submit"; submit.value = "Speichern"; @@ -139,7 +140,8 @@ async function addComments(comments) { add.addEventListener("click", (evt) => { const div = document.createElement("div"); const input = document.createElement("textarea"); - input.placeholder = "Dein Kommentar..."; + input.placeholder = "Dein Kommentar (max. 280 Zeichen)"; + input.maxLength = 280; const submit = document.createElement("input"); submit.type = "submit"; submit.value = "Hinzufügen"; -- cgit v1.2.3