summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/actions/repos_details.html3
-rw-r--r--ogcp/templates/repos.html10
2 files changed, 9 insertions, 4 deletions
diff --git a/ogcp/templates/actions/repos_details.html b/ogcp/templates/actions/repos_details.html
index 32b96bf..2768492 100644
--- a/ogcp/templates/actions/repos_details.html
+++ b/ogcp/templates/actions/repos_details.html
@@ -10,7 +10,8 @@
<h1 class="m-5">{{_('Repo details')}}</h1>
{{ wtf.quick_form(form,
+ action=url_for('repo_add_post'),
method='post',
- button_map={'create': 'primary'},
+ button_map={'submit': 'primary'},
extra_classes="mx-5") }}
{% endblock %}
diff --git a/ogcp/templates/repos.html b/ogcp/templates/repos.html
index 881057b..8477d29 100644
--- a/ogcp/templates/repos.html
+++ b/ogcp/templates/repos.html
@@ -17,8 +17,8 @@
{% set server_ip_port = repos["server"].ip ~ ":" ~ repos["server"].port %}
{% set repos_list = repos["json"]["repositories"] %}
<li class="nav-item">
- <input class="form-check-input" type="checkbox" form="reposForm"
- value="{{ server_ip_port }}" name="selected-server" />
+ <input id="{{ server_ip_port }}"class="form-check-input" type="checkbox" form="reposForm"
+ value="{{ server_ip_port }}" name="repos-server" />
<a class="nav-link {% if not repos_list %}disabled{% endif %}" href="#server{{loop.index}}"
{% if repos_list %}data-toggle="collapse"{% endif %}>
{{ server_name }}
@@ -27,8 +27,9 @@
{% for r in repos_list %}
<li class="nav-item">
<input class="form-check-input" type="checkbox" form="reposForm"
+ data-server="{{server_ip_port}}"
value="{{ r["id"] }}"
- name="selected-repo" />
+ name="{{ r["name"]~_~r["id"] }}" />
{{ r["name"] }}
</li>
{% endfor %}
@@ -42,6 +43,7 @@
document.addEventListener('readystatechange', () => {
if (document.readyState === 'complete') {
keepReposTreeState()
+ checkRepoServer()
}
});
</script>
@@ -50,6 +52,8 @@
{% block commands %}
<input class="btn btn-light {% block nav_repo_add %}{% endblock %}" type="submit" value="{{ _('Add repo') }}"
form="reposForm" formaction="{{ url_for('repo_add_get') }}" formmethod="get">
+ <input class="btn btn-light {% block nav_repo_delete %}{% endblock %}" type="submit" value="{{ _('Delete repo') }}"
+ form="reposForm" formaction="{{ url_for('action_repo_delete') }}" formmethod="get">
{% if btn_back %}
<button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">