diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index c74ec8b..d9d779a 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -112,4 +112,40 @@ min-height: 200px; min-width: 100%; max-width: 100%; -} \ No newline at end of file + resize: none; +} + +.el-form-create-ticket-textarea:focus-visible{ + border: none; + outline: none; +} + +.create-ticket-btn{ + width: 200px; + height: 60px; + padding: 20px 20px; + background: #FF613A; + color: #FFFFFF; + border-radius: 10px; + float: left; +} + +.attach-file-btn{ + background: url("/static/img/svg/attach_a_file.svg"); + background-size: 60px; + background-repeat: no-repeat; + background-position: center; + height: 60px; + width: 60px; + margin-left: 20px; +} + +.create-ticket-file{ + display: block; + opacity: 0; +} + +.form-create-tickets-btns{ + width: 100%; + margin-top: 40px; +} diff --git a/static/img/svg/attach_a_file.svg b/static/img/svg/attach_a_file.svg new file mode 100644 index 0000000..6a262c2 --- /dev/null +++ b/static/img/svg/attach_a_file.svg @@ -0,0 +1,6 @@ + diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index fd4453c..20e8c2e 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -27,4 +27,29 @@ function countLetters () { else { area.setAttribute("disabled","disabled") } +} + +function attachFileCreateTicket () { + event.preventDefault() + let input = document.querySelector(".create-ticket-file") + input.click() + console.log("asd") + let data = input.value + $.ajax({ + headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, + url: '/ru/user_account/support_create_ticket_ajax/', + type: "POST", + // async: true, + cache: false, + processData: false, + contentType: false, + // enctype: 'json', + data: data, + success: function(data){ + + document.querySelector(".insert-tech-place").innerHTML = data.html; + + }, + }); + } \ No newline at end of file diff --git a/templates/blocks/profile/b_create_ticket.html b/templates/blocks/profile/b_create_ticket.html index 19430dd..6c8d99d 100644 --- a/templates/blocks/profile/b_create_ticket.html +++ b/templates/blocks/profile/b_create_ticket.html @@ -9,11 +9,15 @@ name="request_subject" placeholder="Тема запроса" > -