diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:48:45 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-29 12:53:36 +0200 |
commit | ffe6e681b281eef2c1e62bbc6feefb0b85d040ca (patch) | |
tree | 0aa141073403beae9590135fd047d7a2ebd8fe76 /src/hydrilla/proxy/web_ui/templates/base.html.jinja | |
parent | 1a1f750ccdc1d52a7b1bd648b2188fa6e7c1a4b8 (diff) | |
download | haketilo-hydrilla-ffe6e681b281eef2c1e62bbc6feefb0b85d040ca.tar.gz haketilo-hydrilla-ffe6e681b281eef2c1e62bbc6feefb0b85d040ca.zip |
[proxy] make it possible to create "ad hoc" packages through the web UI
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/base.html.jinja')
-rw-r--r-- | src/hydrilla/proxy/web_ui/templates/base.html.jinja | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja index c0eecce..eb9cb57 100644 --- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja @@ -62,6 +62,36 @@ code in a proprietary work, I am not going to enforce this in court. </aside> {% endmacro %} +{% macro form_label(label_text, label_name=none) %} + {% set for_attr = label_name and (label_name + "_field") %} + <label {{ {'for': for_attr, 'class': 'block-with-bottom-margin'}|xmlattr }}> + {{ label_text }} + </label> +{% endmacro %} + +{% macro form_field(field_name, required=true, sep_after=true, height=none) %} + <div class="flex-row"> + {% + set attrs = { + 'id': field_name + '_field', + 'name': field_name, + 'required': '' if required else none, + 'rows': height + } + %} + + {% if height is none %} + <input{{ attrs|xmlattr }}> + {% else %} + <textarea{{ attrs|xmlattr }}></textarea> + {% endif %} + </div> + + {% if sep_after %} + <div class="horizontal-separator"></div> + {% endif %} +{% endmacro %} + <html> <head> {% block head %} @@ -134,6 +164,10 @@ code in a proprietary work, I am not going to enforce this in court. margin: 0 0 10px 0; } + textarea { + resize: none; + } + .green-button, .red-button, .blue-button { border: none; border-radius: 2px; @@ -243,7 +277,7 @@ code in a proprietary work, I am not going to enforce this in court. ('items.packages', _('web_ui.base.nav.packages'), false), ('items.libraries', _('web_ui.base.nav.libraries'), true), ('repos.repos', _('web_ui.base.nav.repos'), false), - ('items.load_from_disk', _('web_ui.base.nav.load'), false) + ('import.items_import', _('web_ui.base.nav.import'), false) ] %} <ul id="nav"> |