mirror of
https://github.com/iFargle/headscale-webui.git
synced 2026-03-25 10:04:45 +01:00
Forgot to add the block for inpage_search
This commit is contained in:
25
renderer.py
25
renderer.py
@@ -581,17 +581,14 @@ def oidc_nav_mobile(user_name, email_address, name):
|
||||
"""
|
||||
return Markup(html_payload)
|
||||
|
||||
def render_search(page):
|
||||
if page == "users" or page == "machines":
|
||||
app.logger.info("Rendering search for %s page", page)
|
||||
html_payload = """
|
||||
<form>
|
||||
<div class="input-field">
|
||||
<input id="search" type="search" required>
|
||||
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
</form>
|
||||
"""
|
||||
return Markup(html_payload)
|
||||
return Markup("")
|
||||
def render_search():
|
||||
html_payload = """
|
||||
<form>
|
||||
<div class="input-field">
|
||||
<input id="search" type="search" required>
|
||||
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
</form>
|
||||
"""
|
||||
return Markup(html_payload)
|
||||
|
||||
@@ -171,7 +171,7 @@ def machines_page():
|
||||
# Check if OIDC is enabled. If it is, display the buttons:
|
||||
OIDC_NAV_DROPDOWN = Markup("")
|
||||
OIDC_NAV_MOBILE = Markup("")
|
||||
INPAGE_SEARCH = Markup(renderer.render_search("machines"))
|
||||
INPAGE_SEARCH = Markup(renderer.render_search())
|
||||
if AUTH_TYPE == "oidc":
|
||||
email_address = oidc.user_getfield("email")
|
||||
user_name = oidc.user_getfield("preferred_username")
|
||||
@@ -200,7 +200,7 @@ def users_page():
|
||||
# Check if OIDC is enabled. If it is, display the buttons:
|
||||
OIDC_NAV_DROPDOWN = Markup("")
|
||||
OIDC_NAV_MOBILE = Markup("")
|
||||
INPAGE_SEARCH = Markup(renderer.render_search("users"))
|
||||
INPAGE_SEARCH = Markup(renderer.render_search()
|
||||
if AUTH_TYPE == "oidc":
|
||||
email_address = oidc.user_getfield("email")
|
||||
user_name = oidc.user_getfield("preferred_username")
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
{% block OIDC_NAV_DROPDOWN %} {{ OIDC_NAV_DROPDOWN}} {% endblock %}
|
||||
{% block OIDC_NAV_MOBILE %} {{ OIDC_NAV_MOBILE }} {% endblock %}
|
||||
{% block INPAGE_SEARCH%} {{ INPAGE_SEARCH }} {% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="row"><br>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
{% block OIDC_NAV_DROPDOWN %} {{ OIDC_NAV_DROPDOWN}} {% endblock %}
|
||||
{% block OIDC_NAV_MOBILE %} {{ OIDC_NAV_MOBILE }} {% endblock %}
|
||||
{% block INPAGE_SEARCH%} {{ INPAGE_SEARCH }} {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row"><br>
|
||||
|
||||
Reference in New Issue
Block a user