Skip to content

Commit eb4830f

Browse files
Merge pull request #12 from maricaantonacci/devel
Minor fixes
2 parents 5c341ca + a266dbe commit eb4830f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/routes.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def avatar(email, size):
4242
"metadata": {
4343
"icon": "https://cdn4.iconfinder.com/data/icons/mosaicon-04/512/websettings-512.png"
4444
},
45+
"enable_config_form": False,
4546
"inputs": {},
4647
"tabs": {}
4748
}
@@ -65,7 +66,6 @@ def avatar(email, size):
6566
toscaInfo[tosca]['inputs'] = template['topology_template']['inputs']
6667

6768
## add parameters code here
68-
enable_config_form = False
6969
tabs = {}
7070
if tosca_pars_dir:
7171
tosca_pars_path = tosca_pars_dir + "/" # this has to be reassigned here because is local.
@@ -77,7 +77,7 @@ def avatar(email, size):
7777
if fname[0] != '.':
7878
tosca_pars_file = os.path.join(fpath, fname)
7979
with io.open(tosca_pars_file) as pars_file:
80-
enable_config_form = True
80+
toscaInfo[tosca]['enable_config_form'] = True
8181
pars_data = yaml.load(pars_file)
8282
toscaInfo[tosca]['inputs'] = pars_data["inputs"]
8383
if "tabs" in pars_data:
@@ -261,8 +261,7 @@ def configure():
261261
return render_template('createdep.html',
262262
template=toscaInfo[selected_tosca],
263263
selectedTemplate=selected_tosca,
264-
slas=slas,
265-
enable_config_form=enable_config_form)
264+
slas=slas)
266265

267266

268267
def add_sla_to_template(template, sla_id):

app/templates/createdep.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h4 class="font-weight-bold text-primary">
2929
</div>
3030

3131
<form id="depSubmit" action="{{ url_for('createdep', template=selectedTemplate) }}" method="post">
32-
{% if enable_config_form %}
32+
{% if template['enable_config_form'] is defined and template['enable_config_form'] is sameas true %}
3333
{% include 'config_form.html' %}
3434
{% else %}
3535
{% include 'default_form.html' %}

0 commit comments

Comments
 (0)