summaryrefslogtreecommitdiffstats
path: root/ogcp/forms/action_forms.py
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-12-01 15:55:15 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-12-01 17:20:08 +0100
commit285843634162860b1ba19f71834f06f4fca54583 (patch)
treeacff35ea64421e7153fa9ea6d39172cd3b6ef07f /ogcp/forms/action_forms.py
parent215e3c2fc0453122b5fefcc7fe39f14797bee17f (diff)
src: add menu to manage repos
The menu includes a list of the repos of each server. The user can select a server or a repo to make changes. As of now, the only action possible is to add a repo to selected server. The work contained in this commit can be structured in: 1. Add the repos menu: - Add a 'repos' button in the menus bar (base.html). - Add repos.html template to create the management repos menu. - In ogcp.js, add function to store in browser's local storage which elements of the sidebar are uncollapsed. This saves the sidebar state after a page refresh. - Add manage_repos() in views.py 2. Allow to add a repo: - Add template with form to add a repo (repos_details.html) - Create RepoForm(FlaskForm) in action_forms.py - Add repo_add_get() and repo_add_post() in views.py
Diffstat (limited to 'ogcp/forms/action_forms.py')
-rw-r--r--ogcp/forms/action_forms.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 6f3f4b9..0a9bd32 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -98,6 +98,12 @@ class ImageRestoreForm(FlaskForm):
choices=[('TIPTORRENT', 'TIPTORRENT')])
restore = SubmitField(label=_l('Restore'))
+class RepoForm(FlaskForm):
+ server = HiddenField()
+ name = StringField(label=_l('Name'))
+ ip = StringField(label=_l('IP'))
+ create = SubmitField(label=_l('Create'))
+
class ClientDetailsForm(FlaskForm):
server = HiddenField()
name = StringField(label=_l('Name'))