Merge "Use same form for Create Router in network topology"
This commit is contained in:
commit
2be0a22863
@ -0,0 +1,18 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack_dashboard.dashboards.project.routers \
|
||||
import forms as router_forms
|
||||
|
||||
|
||||
class NTCreateRouterForm(router_forms.CreateForm):
|
||||
failure_url = 'horizon:project:network_topology:index'
|
@ -1,16 +0,0 @@
|
||||
{% extends "horizon/common/_modal_form.html" %}
|
||||
{% load i18n horizon humanize %}
|
||||
|
||||
{% block form_id %}{% endblock %}
|
||||
{% block form_action %}{% url 'horizon:project:network_topology:createrouter' %}?{{ request.GET.urlencode }}{% endblock %}
|
||||
|
||||
{% block modal_id %}create_router_modal{% endblock %}
|
||||
{% block modal-header %}{% trans "Create Router" %}{% endblock %}
|
||||
|
||||
{% block modal-body %}
|
||||
<div class="left">
|
||||
<fieldset>
|
||||
{% include "horizon/common/_form_fields.html" %}
|
||||
</fieldset>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,7 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create Router" %}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% include 'project/network_topology/_create_router.html' %}
|
||||
{% endblock %}
|
@ -30,6 +30,7 @@ from horizon import tabs
|
||||
from horizon.utils.lazy_encoder import LazyTranslationEncoder
|
||||
|
||||
from openstack_dashboard import api
|
||||
from openstack_dashboard.dashboards.project.network_topology import forms
|
||||
from openstack_dashboard.dashboards.project.network_topology.instances \
|
||||
import tables as instances_tables
|
||||
from openstack_dashboard.dashboards.project.network_topology.networks \
|
||||
@ -120,8 +121,9 @@ class NTAddInterfaceView(p_views.AddInterfaceView):
|
||||
|
||||
|
||||
class NTCreateRouterView(r_views.CreateView):
|
||||
template_name = 'project/network_topology/create_router.html'
|
||||
form_class = forms.NTCreateRouterForm
|
||||
success_url = reverse_lazy("horizon:project:network_topology:index")
|
||||
submit_url = reverse_lazy("horizon:project:network_topology:createrouter")
|
||||
page_title = _("Create a Router")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user