mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-10-31 01:57:59 +00:00 
			
		
		
		
	Load steps after setting flavor
This commit is contained in:
		| @@ -65,6 +65,11 @@ def build_app(path): | ||||
|         def wizard(): | ||||
|             return flask.render_template('wizard.html') | ||||
|  | ||||
|         @bp.route("/submit_flavor", methods=["POST"]) | ||||
|         def submit_flavor(): | ||||
|             data = flask.request.form.copy() | ||||
|             return flask.render_template('wizard.html', flavor=data["flavor"]) | ||||
|  | ||||
|         @bp.route("/submit", methods=["POST"]) | ||||
|         def submit(): | ||||
|             data = flask.request.form.copy() | ||||
|   | ||||
| @@ -9,10 +9,10 @@ | ||||
|   </div> | ||||
| {% endmacro %} | ||||
|  | ||||
| {% macro radio(name, value, emph, text) %} | ||||
| {% macro radio(name, value, emph, text, current) %} | ||||
|   <div class="radio"> | ||||
|     <label> | ||||
|       <input type="radio" name="{{ name }}" value="{{ value }}"> | ||||
|       <input type="radio" name="{{ name }}" value="{{ value }}"{% if current == value %} checked="checked"{% endif %}> | ||||
|       {% if emph %} | ||||
|       <strong>{{ emph }}</strong>, | ||||
|       {% endif %} | ||||
|   | ||||
| @@ -7,10 +7,10 @@ developpers, will mostly cover Compose and Stack, while other flavors are | ||||
| maintained by specific contributors.</p> | ||||
| 
 | ||||
| <div class="radio"> | ||||
|   {{ macros.radio("flavor", "compose", "Compose", "simply using Docker Compose manager") }} | ||||
|   {{ macros.radio("flavor", "stack", "Stack", "using stack deployments in a Swarm cluster") }} | ||||
|   {{ macros.radio("flavor", "rancher", "Rancher", "on top of the Rancher container manager") }} | ||||
|   {{ macros.radio("flavor", "kubernetes", "Kubernetes", "on top of the Kubernetes container manager") }} | ||||
|   {{ macros.radio("flavor", "compose", "Compose", "simply using Docker Compose manager", flavor) }} | ||||
|   {{ macros.radio("flavor", "stack", "Stack", "using stack deployments in a Swarm cluster", flavor) }} | ||||
|   {{ macros.radio("flavor", "rancher", "Rancher", "on top of the Rancher container manager", flavor) }} | ||||
|   {{ macros.radio("flavor", "kubernetes", "Kubernetes", "on top of the Kubernetes container manager", flavor) }} | ||||
| </div> | ||||
| 
 | ||||
| {% endcall %} | ||||
| @@ -8,13 +8,18 @@ | ||||
|   ready when using this wizard. | ||||
|   {% endcall %} | ||||
|  | ||||
|   <form method="post" action="{{ url_for(".submit_flavor") }}"> | ||||
|   {% include "steps/flavor.html" %} | ||||
|   <input class="btn btn-primary" type="submit" value="Next >" style="margin-bottom: 15px"> | ||||
|   </form> | ||||
|   {% if flavor %} | ||||
|   <form method="post" action="{{ url_for(".submit") }}"> | ||||
|   {% include "steps/compose/flavor.html" %} | ||||
|   {% include "steps/compose/config.html" %} | ||||
|   {% include "steps/compose/services.html" %} | ||||
|   {% include "steps/compose/expose.html" %} | ||||
| <!--   {% include "steps/compose/optional.html" %} --> | ||||
|  | ||||
|   <input type="hidden" name="flavor" value="{{ flavor }}"> | ||||
|   {% include "steps/" + flavor + "/config.html" %} | ||||
|   {% include "steps/" + flavor + "/services.html" %} | ||||
|   {% include "steps/" + flavor + "/expose.html" %} | ||||
|   <input class="btn btn-primary" type="submit" value="Setup Mailu"> | ||||
|   {% endif %} | ||||
| <!--   {% include "steps/compose/optional.html" %} --> | ||||
|   </form> | ||||
| {% endblock %} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tim Möhlmann
					Tim Möhlmann