ui: clean up more generic forms, remove is_login everywhere
This commit is contained in:
@ -74,11 +74,6 @@ class PassbookAuthorizationView(AccessMixin, AuthorizationView):
|
||||
LOGGER.debug(request.GET.get("redirect_uri"))
|
||||
return actual_response
|
||||
|
||||
def render_to_response(self, context, **kwargs):
|
||||
# Always set is_login to true for correct css class
|
||||
context["is_login"] = True
|
||||
return super().render_to_response(context, **kwargs)
|
||||
|
||||
def form_valid(self, form):
|
||||
# User has clicked on "Authorize"
|
||||
Event.new(
|
||||
|
||||
@ -66,10 +66,7 @@ class AccessRequiredView(AccessMixin, View):
|
||||
return render(
|
||||
request,
|
||||
"login/denied.html",
|
||||
{
|
||||
"title": _("You don't have access to this application"),
|
||||
"is_login": True,
|
||||
},
|
||||
{"title": _("You don't have access to this application"),},
|
||||
)
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
@ -142,12 +139,7 @@ class LoginProcessView(AccessRequiredView):
|
||||
return render(
|
||||
request,
|
||||
"saml/idp/login.html",
|
||||
{
|
||||
"saml_params": params,
|
||||
"provider": self.provider,
|
||||
# This is only needed to for the template to render correctly
|
||||
"is_login": True,
|
||||
},
|
||||
{"saml_params": params, "provider": self.provider,},
|
||||
)
|
||||
|
||||
except exceptions.CannotHandleAssertion as exc:
|
||||
@ -308,10 +300,5 @@ class InitiateLoginView(AccessRequiredView):
|
||||
return render(
|
||||
request,
|
||||
"saml/idp/login.html",
|
||||
{
|
||||
"saml_params": params,
|
||||
"provider": self.provider,
|
||||
# This is only needed to for the template to render correctly
|
||||
"is_login": True,
|
||||
},
|
||||
{"saml_params": params, "provider": self.provider,},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user