0.0.10 update registrarion and login form
This commit is contained in:
@@ -98,25 +98,42 @@ html, body{
|
||||
/*Стилизация radio button */
|
||||
|
||||
.form_radio_btn {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
width: 375px;
|
||||
border-radius: 14px;
|
||||
background: #FFF;
|
||||
display: flex;
|
||||
height: 70px;
|
||||
align-items: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.form_radio_btn input[type=radio] {
|
||||
display: none;
|
||||
}
|
||||
.form_radio_btn label {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 0px 15px;
|
||||
line-height: 34px;
|
||||
border: 1px solid #999;
|
||||
border-radius: 6px;
|
||||
user-select: none;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
/* Body text 1 */
|
||||
font-family: Inter;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
line-height: 22px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
width: 169px;
|
||||
height: 44px;
|
||||
padding: 8px 16px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
margin: 0px 3px;
|
||||
}
|
||||
|
||||
/* Checked */
|
||||
.form_radio_btn input[type=radio]:checked + label {
|
||||
background: #ffe0a6;
|
||||
background: #FF613A;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Hover */
|
||||
@@ -512,13 +529,12 @@ section.register>form {
|
||||
background: #FFF;
|
||||
display: flex;
|
||||
height: 70px;
|
||||
align-items: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
a.active {
|
||||
input.active {
|
||||
text-decoration: none;
|
||||
color: #FFF;
|
||||
/* Body text 1 */
|
||||
@@ -540,7 +556,7 @@ a.active {
|
||||
margin: 0px 3px;
|
||||
}
|
||||
|
||||
a.deadctive {
|
||||
input.deactive {
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@@ -631,7 +647,7 @@ section.login>h1 {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
section.login>div {
|
||||
section.login>form {
|
||||
width: 420px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
@@ -651,7 +667,7 @@ section.login>div {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
section.login>div>div:nth-child(4) {
|
||||
section.login>form>div>div:nth-child(4) {
|
||||
color: rgba(39, 36, 36, 0.60);
|
||||
text-align: center;
|
||||
/* Body text 3 */
|
||||
@@ -663,7 +679,7 @@ section.login>div>div:nth-child(4) {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
section.login>div>div:nth-child(5) {
|
||||
section.login>form>div>div:nth-child(5) {
|
||||
color: #272424;
|
||||
text-align: center;
|
||||
/* Heading 5 */
|
||||
@@ -689,7 +705,7 @@ section.login>div>div:nth-child(5) {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
section.login>div>div:nth-child(7) {
|
||||
section.login>form>div>div:nth-child(7) {
|
||||
color: rgba(39, 36, 36, 0.60);
|
||||
/* Body text 1 */
|
||||
font-family: Inter;
|
||||
@@ -699,7 +715,7 @@ section.login>div>div:nth-child(7) {
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
section.login>div>div:nth-child(7)>a {
|
||||
section.login>form>div>div:nth-child(7)>a {
|
||||
text-decoration: none;
|
||||
color: rgba(39, 36, 36, 0.60);
|
||||
}
|
||||
|
||||
25
static/js/authorization.js
Normal file
25
static/js/authorization.js
Normal file
@@ -0,0 +1,25 @@
|
||||
function SendLoginForm(el){
|
||||
event.preventDefault()
|
||||
let form = el.form;
|
||||
let formData = new FormData(form);
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/login/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
// enctype: 'json',
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
location.href = '/profile'
|
||||
},
|
||||
error: function (data, exception){
|
||||
document.querySelector(".login").innerHTML = data.responseJSON.html
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ function SendRegistrationForm(el){
|
||||
data: formData,
|
||||
success: function(data){
|
||||
|
||||
// location.href = '/'
|
||||
location.href = '/profile'
|
||||
},
|
||||
error: function (data, exception){
|
||||
document.querySelector(".register").innerHTML = data.responseJSON.html
|
||||
|
||||
Reference in New Issue
Block a user