Commit 05baddb2 by Will Daly

Add remember me checkbox back to the combined login/registration page

parent 22d818e0
...@@ -220,6 +220,11 @@ $sm-btn-linkedin: #0077b5; ...@@ -220,6 +220,11 @@ $sm-btn-linkedin: #0077b5;
font-weight: 500; font-weight: 500;
} }
#login-remember {
line-height: 0;
height: auto;
}
label { label {
display: block; display: block;
margin: 0 0 6px 0; margin: 0 0 6px 0;
...@@ -239,6 +244,10 @@ $sm-btn-linkedin: #0077b5; ...@@ -239,6 +244,10 @@ $sm-btn-linkedin: #0077b5;
vertical-align: top; vertical-align: top;
} }
&[for="login-remember"] {
display: inline-block;
}
a { a {
font-family: $sans-serif; font-family: $sans-serif;
} }
......
...@@ -646,7 +646,18 @@ class LoginSessionViewTest(ApiTestCase): ...@@ -646,7 +646,18 @@ class LoginSessionViewTest(ApiTestCase):
"max_length": PASSWORD_MAX_LENGTH "max_length": PASSWORD_MAX_LENGTH
}, },
"errorMessages": {}, "errorMessages": {},
} },
{
"name": "remember",
"defaultValue": False,
"type": "checkbox",
"required": False,
"label": "Remember me",
"placeholder": "",
"instructions": "",
"restrictions": {},
"errorMessages": {},
},
]) ])
def test_login(self): def test_login(self):
......
...@@ -102,6 +102,14 @@ class LoginSessionView(APIView): ...@@ -102,6 +102,14 @@ class LoginSessionView(APIView):
} }
) )
form_desc.add_field(
"remember",
field_type="checkbox",
label=_("Remember me"),
default=False,
required=False,
)
return HttpResponse(form_desc.to_json(), content_type="application/json") return HttpResponse(form_desc.to_json(), content_type="application/json")
@method_decorator(require_post_params(["email", "password"])) @method_decorator(require_post_params(["email", "password"]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment