diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 111446e..9cca590 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -135,8 +135,9 @@ /*max-width: calc(80% - 40px);*/ resize: none; padding: 20px; - width: 80%; + width: 85%; float: left; + } .container-input-form-create-ticket{ @@ -154,7 +155,7 @@ /*top: 39px;*/ /*left: 93%;*/ height: calc(100% - 20px); - width: calc(20% - 60px); + width: calc(15% - 60px); padding-top: 20px; padding-right: 20px; min-height: 220px; @@ -164,6 +165,13 @@ /*display: inline-block;*/ } +.letrs-count.disabled{ + /*color: #000000;*/ + background: rgb(241 241 241 / 30%); + color: #ff001a; +} + + .create-ticket-btn{ width: 200px; height: 60px; diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index 22f6f0c..9204a52 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -18,15 +18,24 @@ function createTicketShow () { } function countLetters () { + event.preventDefault() let area = document.querySelector(".el-form-create-ticket-textarea") let count = area.value.length - if (count <= 500) { + let ins_area = document.querySelector(".letrs-count-span") + // let spans = document.querySelectorAll(".ins-span") + if (count < 500) { let ins_area = document.querySelector(".letrs-count-span") ins_area.innerHTML = count } else { + ins_area.innerHTML = '500' + // spans[0].classList.toggle("disabled") + // spans[1].classList.toggle("disabled") area.setAttribute("disabled","disabled") + let count_div = ins_area.closest("div") + count_div.classList.toggle("disabled") } + } // var input; diff --git a/templates/blocks/profile/b_create_ticket.html b/templates/blocks/profile/b_create_ticket.html index 80aa0cd..24b2da4 100644 --- a/templates/blocks/profile/b_create_ticket.html +++ b/templates/blocks/profile/b_create_ticket.html @@ -26,15 +26,16 @@ {% if form.errors.name %}