From ffe6e681b281eef2c1e62bbc6feefb0b85d040ca Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 28 Sep 2022 12:48:45 +0200 Subject: [proxy] make it possible to create "ad hoc" packages through the web UI --- .../proxy/web_ui/templates/import.html.jinja | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 src/hydrilla/proxy/web_ui/templates/import.html.jinja (limited to 'src/hydrilla/proxy/web_ui/templates/import.html.jinja') diff --git a/src/hydrilla/proxy/web_ui/templates/import.html.jinja b/src/hydrilla/proxy/web_ui/templates/import.html.jinja new file mode 100644 index 0000000..a8f16a4 --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/import.html.jinja @@ -0,0 +1,120 @@ +{# +SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 + +Proxy web UI item loading page. + +This file is part of Hydrilla&Haketilo. + +Copyright (C) 2022 Wojtek Kosior + +Dual licensed under +* GNU General Public License v3.0 or later and +* Creative Commons Attribution Share Alike 4.0 International. + +You can choose to use either of these licenses or both. + + +I, Wojtek Kosior, thereby promise not to sue for violation of this +file's licenses. Although I request that you do not make use of this +code in a proprietary work, I am not going to enforce this in court. +#} +{% extends "base.html.jinja" %} + +{% block title %} {{ _('web_ui.import.title') }} {% endblock %} + +{% block style %} + {{ super() }} + + input[type="file"]::-webkit-file-selector-button, + input[type="file"]::file-selector-button { + display: none; + } + + input[type="file"] { + display: block; + font-size: inherit; + font-style: inherit; + } +{% endblock %} + +{% block main %} +

{{ _('web_ui.import.heading') }}

+ +

{{ _('web_ui.import.heading_import_from_file') }}

+ +
+ + + {% if uploaded_file_not_zip is defined %} + {{ error_note(_('web_ui.err.uploaded_file_not_zip')) }} + {% endif %} + + {% if invalid_uploaded_malcontent is defined %} + {{ error_note(_('web_ui.err.invalid_uploaded_malcontent')) }} + {% endif %} + + + + + +
+ +
+ +
+
+ +
+ +

{{ _('web_ui.import.heading_import_ad_hoc') }}

+ + {% if invalid_ad_hoc_package is defined %} + {{ error_note(_('web_ui.err.invalid_ad_hoc_package')) }} + {% endif %} + +
+ + + {{ form_label(_('web_ui.import.identifier_field_label'), 'identifier') }} + {% if invalid_ad_hoc_identifier is defined %} + {{ error_note(_('web_ui.err.invalid_ad_hoc_identifier')) }} + {% endif %} + {{ form_field('identifier') }} + + {{ form_label(_('web_ui.import.long_name_field_label'), 'long_name') }} + {{ form_field('long_name', required=false) }} + + {{ form_label(_('web_ui.import.version_field_label'), 'version') }} + {% if invalid_ad_hoc_version is defined %} + {{ error_note(_('web_ui.err.invalid_ad_hoc_version')) }} + {% endif %} + {{ form_field('version', required=false) }} + + {{ form_label(_('web_ui.import.description_field_label'), 'description') }} + {{ form_field('description', required=false, height=3) }} + + {{ form_label(_('web_ui.import.patterns_field_label'), 'patterns') }} + {% if invalid_ad_hoc_patterns is defined %} + {{ error_note(_('web_ui.err.invalid_ad_hoc_patterns')) }} + {% endif %} + {{ form_field('patterns', height=3) }} + + {{ form_label(_('web_ui.import.script_text_field_label'), 'script_text') }} + {{ form_field('script_text', required=false, height=15) }} + + {{ form_label(_('web_ui.import.lic_text_field_label'), 'license_text') }} + {{ form_field('license_text', required=false, height=10) }} + +
+ +
+
+{% endblock %} -- cgit v1.2.3