aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/base.html.jinja
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/base.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/base.html.jinja36
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">