murano-dashboard/muranodashboard/templates/services/_wizard_create.html

76 lines
2.5 KiB
HTML

<style>
.italic {font-style:italic;}
</style>
{% extends "common/_modal_form.html" %}
{% load i18n humanize %}
{% load url from future %} {# fix for django 1.4.9 on CentOS #}
{% block form_action %}
{% url 'horizon:murano:catalog:add' environment_id app_id %}
{% endblock %}
{% block form_id %}create_service_form{% endblock %}
{% block modal_id %}create_service{% endblock %}
{% block modal-header %}{% trans "Add Application" %}{% endblock %}
{% block modal-body %}
<div class="left">
{{ wizard.management_form }}
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{{ form }}
{% endfor %}
{% else %}
<fieldset>
{% with form=wizard.form %}
{% include "common/_form_fields.html" %}
{% endwith %}
</fieldset>
{% endif %}
<p class='italic'>{% blocktrans %} {{ extended_description }} {% endblocktrans %}</p>
</div>
<div class="right">
<h3> {% blocktrans %} {{ service_name }} Application{% endblocktrans %} </h3>
{% for title, description in field_descriptions %}
<p>
{% if title %}
<strong>{% blocktrans %}{{ title }}:{% endblocktrans %}</strong>
{% endif %}
{% blocktrans %}{{ description }}{% endblocktrans %}
</p>
{% endfor %}
</div>
{% endblock %}
{% block modal-footer %}
<script type="text/javascript">
$(function() {
{# Make element ids unique per-wizard to avoid interference #}
{# upon pressing 'Back' button while creating one application #}
{# from another #}
var btn_id = '#{{ prefix }}_btn', val_id = '#{{ prefix }}_val';
$(btn_id).click(function() {
$(val_id).val('{{ wizard.steps.prev }}')
});
});
</script>
{{ wizard.form.media }}
<input type="hidden" name="wizard_goto_step" id="{{ prefix }}_val"/>
<input type="hidden" name="do_redirect" value="{{ do_redirect }}"/>
<input type="hidden" name="drop_wm_form" value="{{ drop_wm_form }}"/>
{% if wizard.steps.next %}
{% trans "Next" as next %}
{% else %}
{% trans "Create" as next %}
{% endif %}
{% if wizard.steps.index > 0 %}
<input type="submit" class="btn btn-primary pull-right" value="{{ next }}"/>
<button name="wizard_goto_step" type="submit" class="btn btn-small"
id="{{ prefix }}_btn">{% trans "Back" %}</button>
{% else %}
<button name="wizard_goto_step" type="submit" class="btn btn-small">
{{ next }}</button>
{% endif %}
{% endblock %}