diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 718bd3d..9e3a9f6 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -142,6 +142,11 @@ class ClientDetailsForm(FlaskForm): boot = SelectField(label=_l('Boot Mode'), validate_choice=False) submit = SubmitField(label=_l('Submit')) +class ClientMoveForm(FlaskForm): + ips = HiddenField() + scopes = SelectField(label=_l('Scopes'), validate_choice=False) + submit = SubmitField(label=_l('Submit')) + class ImportClientsForm(FlaskForm): server = HiddenField() room = SelectField(label=_l('Room')) diff --git a/ogcp/templates/actions/client_move.html b/ogcp/templates/actions/client_move.html new file mode 100644 index 0000000..d9bcaac --- /dev/null +++ b/ogcp/templates/actions/client_move.html @@ -0,0 +1,25 @@ +{% extends 'scopes.html' %} +{% import "bootstrap/wtf.html" as wtf %} +{% import "macros.html" as macros %} + +{% set sidebar_state = 'disabled' %} +{% set btn_back = true %} + +{% block nav_client %} active {% endblock %} +{% block nav_client_move %} active {% endblock %} +{% block content %} + +{% set ip_list = form.ips.data.split(' ') %} +{% set ip_count = ip_list | length %} +

+ {{ _('Move %(ip_count)d client(s)', ip_count=ip_count) }} +

+ +{{ macros.cmd_selected_clients(selected_clients) }} + +{{ wtf.quick_form(form, + method='post', + button_map={'submit': 'primary'}, + extra_classes="mx-5") }} + +{% endblock %} diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html index 0dde6a6..a96ae62 100644 --- a/ogcp/templates/scopes.html +++ b/ogcp/templates/scopes.html @@ -26,6 +26,8 @@ form="scopesForm" formaction="{{ url_for('action_client_add') }}" formmethod="get"> +