+
- {% if msg.level_tag == 'danger' %}
-
+ {% if msg.level_tag == 'error' %}
+
{% elif msg.level_tag == 'warning' %}
-
+
{% elif msg.level_tag == 'success' %}
-
+
{% elif msg.level_tag == 'info' %}
-
+
{% endif %}
-
+
{{ msg.message|safe }}
-
-
-
-
+
{% endfor %}
diff --git a/passbook/core/views/authentication.py b/passbook/core/views/authentication.py
index 2014e199a..af9f83ef0 100644
--- a/passbook/core/views/authentication.py
+++ b/passbook/core/views/authentication.py
@@ -40,7 +40,6 @@ class LoginView(UserPassesTestMixin, FormView):
def get_context_data(self, **kwargs):
kwargs["config"] = CONFIG.y("passbook")
- kwargs["is_login"] = True
kwargs["title"] = _("Log in to your account")
kwargs["primary_action"] = _("Log in")
kwargs["show_sign_up_notice"] = CONFIG.y("passbook.sign_up.enabled")
@@ -139,7 +138,6 @@ class SignUpView(UserPassesTestMixin, FormView):
def get_context_data(self, **kwargs):
kwargs["config"] = CONFIG.y("passbook")
- kwargs["is_login"] = True
kwargs["title"] = _("Sign Up")
kwargs["primary_action"] = _("Sign up")
return super().get_context_data(**kwargs)
diff --git a/passbook/core/views/error.py b/passbook/core/views/error.py
index b9301d385..f199d8df1 100644
--- a/passbook/core/views/error.py
+++ b/passbook/core/views/error.py
@@ -32,8 +32,6 @@ class BadRequestView(TemplateView):
response_class = BadRequestTemplateResponse
template_name = "error/400.html"
- extra_context = {"is_login": True}
-
class ForbiddenView(TemplateView):
"""Show Forbidden message"""
@@ -41,8 +39,6 @@ class ForbiddenView(TemplateView):
response_class = ForbiddenTemplateResponse
template_name = "error/403.html"
- extra_context = {"is_login": True}
-
class NotFoundView(TemplateView):
"""Show Not Found message"""
@@ -50,8 +46,6 @@ class NotFoundView(TemplateView):
response_class = NotFoundTemplateResponse
template_name = "error/404.html"
- extra_context = {"is_login": True}
-
class ServerErrorView(TemplateView):
"""Show Server Error message"""
@@ -59,8 +53,6 @@ class ServerErrorView(TemplateView):
response_class = ServerErrorTemplateResponse
template_name = "error/500.html"
- extra_context = {"is_login": True}
-
# pylint: disable=useless-super-delegation
def dispatch(self, *args, **kwargs):
"""Little wrapper so django accepts this function"""
diff --git a/passbook/core/views/user.py b/passbook/core/views/user.py
index caa4e3914..6c4bdcfc6 100644
--- a/passbook/core/views/user.py
+++ b/passbook/core/views/user.py
@@ -67,7 +67,6 @@ class UserChangePasswordView(LoginRequiredMixin, FormView):
def get_context_data(self, **kwargs):
kwargs["config"] = CONFIG.y("passbook")
- kwargs["is_login"] = True
kwargs["title"] = _("Change Password")
kwargs["primary_action"] = _("Change")
return super().get_context_data(**kwargs)
diff --git a/passbook/core/views/utils.py b/passbook/core/views/utils.py
index 1bedcff24..3a28c95a5 100644
--- a/passbook/core/views/utils.py
+++ b/passbook/core/views/utils.py
@@ -15,7 +15,6 @@ class LoadingView(TemplateView):
return self.target_url
def get_context_data(self, **kwargs):
- kwargs["is_login"] = True
kwargs["title"] = self.title
kwargs["target_url"] = self.get_url()
return super().get_context_data(**kwargs)
@@ -28,6 +27,5 @@ class PermissionDeniedView(TemplateView):
title = _("Permission denied.")
def get_context_data(self, **kwargs):
- kwargs["is_login"] = True
kwargs["title"] = self.title
return super().get_context_data(**kwargs)
diff --git a/passbook/factors/base.py b/passbook/factors/base.py
index 1aec40ca5..ec44b213d 100644
--- a/passbook/factors/base.py
+++ b/passbook/factors/base.py
@@ -25,7 +25,6 @@ class AuthenticationFactor(TemplateView):
def get_context_data(self, **kwargs):
kwargs["config"] = CONFIG.y("passbook")
- kwargs["is_login"] = True
kwargs["title"] = _("Log in to your account")
kwargs["primary_action"] = _("Log in")
kwargs["user"] = self.pending_user
diff --git a/passbook/factors/otp/views.py b/passbook/factors/otp/views.py
index 7435d9488..5561482ce 100644
--- a/passbook/factors/otp/views.py
+++ b/passbook/factors/otp/views.py
@@ -77,7 +77,6 @@ class EnableView(LoginRequiredMixin, FormView):
# TODO: Check if OTP Factor exists and applies to user
def get_context_data(self, **kwargs):
kwargs["config"] = CONFIG.y("passbook")
- kwargs["is_login"] = True
kwargs["title"] = _("Configure OTP")
kwargs["primary_action"] = _("Setup")
return super().get_context_data(**kwargs)
diff --git a/passbook/providers/oauth/views/oauth2.py b/passbook/providers/oauth/views/oauth2.py
index 1a8aa90d0..3006f08e6 100644
--- a/passbook/providers/oauth/views/oauth2.py
+++ b/passbook/providers/oauth/views/oauth2.py
@@ -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(
diff --git a/passbook/providers/saml/views.py b/passbook/providers/saml/views.py
index 2c1931056..daf646cbc 100644
--- a/passbook/providers/saml/views.py
+++ b/passbook/providers/saml/views.py
@@ -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,},
)
diff --git a/passbook/root/settings.py b/passbook/root/settings.py
index b51758fd4..1ac829ed1 100644
--- a/passbook/root/settings.py
+++ b/passbook/root/settings.py
@@ -78,7 +78,7 @@ INSTALLED_APPS = [
"guardian",
"django_prometheus",
"passbook.core.apps.PassbookCoreConfig",
- 'passbook.static.apps.PassbookStaticConfig',
+ "passbook.static.apps.PassbookStaticConfig",
"passbook.admin.apps.PassbookAdminConfig",
"passbook.api.apps.PassbookAPIConfig",
"passbook.lib.apps.PassbookLibConfig",
diff --git a/passbook/static/static/passbook/pf.css b/passbook/static/static/passbook/pf.css
index 1be41fc58..718b516f5 100644
--- a/passbook/static/static/passbook/pf.css
+++ b/passbook/static/static/passbook/pf.css
@@ -1,3 +1,4 @@
+/* Fix patternfly sidebar and header with open Modal */
.pf-c-page__sidebar {
z-index: 0;
}
@@ -5,3 +6,209 @@
.pf-c-page__header {
z-index: 0;
}
+
+@@ -1,204 +0,0 @@
+.navbar-brand-name {
+ height: 35px;
+}
+
+.dynamic-array-widget .array-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+}
+
+.dynamic-array-widget .remove_sign {
+ width: 10px;
+ height: 2px;
+ background: #a41515;
+ border-radius: 1px;
+}
+
+.dynamic-array-widget .remove {
+ height: 15px;
+ display: flex;
+ align-items: center;
+ margin-left: 5px;
+}
+
+.dynamic-array-widget .remove:hover {
+ cursor: pointer;
+}
+
+/* Selector */
+.selector {
+ display: flex;
+ width: 100%;
+ height: 45vh;
+}
+
+.selector .selector-filter {
+ display: flex;
+ align-items: center;
+}
+
+.selector .selector-filter label {
+ margin: 0 8px 0 0;
+}
+
+.selector .selector-filter input {
+ width: auto;
+ min-height: 0;
+ flex: 1 1;
+}
+
+.selector-available, .selector-chosen {
+ width: auto;
+ flex: 1 1;
+ display: flex;
+ flex-direction: column;
+}
+
+.selector select {
+ width: 100%;
+ flex: 1 0 auto;
+ margin-bottom: 5px;
+}
+
+.selector ul.selector-chooser {
+ width: 26px;
+ height: 52px;
+ padding: 2px 0;
+ margin: auto 15px;
+ border-radius: 20px;
+ transform: translateY(-10px);
+ list-style: none;
+}
+
+.selector-add, .selector-remove {
+ width: 20px;
+ height: 20px;
+ background-size: 20px auto;
+}
+
+.selector-add {
+ background-position: 0 -120px;
+}
+
+.selector-remove {
+ background-position: 0 -80px;
+}
+
+a.selector-chooseall, a.selector-clearall {
+ align-self: center;
+}
+
+.stacked {
+ flex-direction: column;
+ max-width: 480px;
+}
+
+.stacked > * {
+ flex: 0 1 auto;
+}
+
+.stacked select {
+ margin-bottom: 0;
+}
+
+.stacked .selector-available, .stacked .selector-chosen {
+ width: auto;
+}
+
+.stacked ul.selector-chooser {
+ width: 52px;
+ height: 26px;
+ padding: 0 2px;
+ margin: 15px auto;
+ transform: none;
+}
+
+.stacked .selector-chooser li {
+ padding: 3px;
+}
+
+.stacked .selector-add, .stacked .selector-remove {
+ background-size: 20px auto;
+}
+
+.stacked .selector-add {
+ background-position: 0 -40px;
+}
+
+.stacked .active.selector-add {
+ background-position: 0 -60px;
+}
+
+.stacked .selector-remove {
+ background-position: 0 0;
+}
+
+.stacked .active.selector-remove {
+ background-position: 0 -20px;
+}
+
+.help-tooltip, .selector .help-icon {
+ display: none;
+}
+
+form .form-row p.datetime {
+ width: 100%;
+}
+
+.datetime input {
+ width: 50%;
+ max-width: 120px;
+}
+
+.datetime span {
+ font-size: 13px;
+}
+
+.datetime .timezonewarning {
+ display: block;
+ font-size: 11px;
+ color: #999;
+}
+
+.datetimeshortcuts {
+ color: #ccc;
+}
+
+.inline-group {
+ overflow: auto;
+}
+
+.selector-add, .selector-remove {
+ width: 16px;
+ height: 16px;
+ display: block;
+ text-indent: -3000px;
+ overflow: hidden;
+ cursor: default;
+ opacity: 0.3;
+}
+
+.active.selector-add, .active.selector-remove {
+ opacity: 1;
+}
+
+.active.selector-add:hover, .active.selector-remove:hover {
+ cursor: pointer;
+}
+
+.selector-add {
+ background: url(../admin/img/selector-icons.svg) 0 -96px no-repeat;
+}
+
+.active.selector-add:focus, .active.selector-add:hover {
+ background-position: 0 -112px;
+}
+
+.selector-remove {
+ background: url(../admin/img/selector-icons.svg) 0 -64px no-repeat;
+}
+
+input[data-is-monospace] {
+ font-family: monospace;
+}