Fix master template bug when no form in context
This commit is contained in:
parent
5a7deadba2
commit
e7b8b6e818
|
@ -6,9 +6,11 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
## declare extra data needed by form
|
## declare extra data needed by form
|
||||||
% for key, value in form.json_data.items():
|
% if form is not Undefined:
|
||||||
${form.component_studly}Data.${key} = ${json.dumps(value)|n}
|
% for key, value in form.json_data.items():
|
||||||
% endfor
|
${form.component_studly}Data.${key} = ${json.dumps(value)|n}
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
|
||||||
% if master.deletable and instance_deletable and master.has_perm('delete') and master.delete_confirm == 'simple':
|
% if master.deletable and instance_deletable and master.has_perm('delete') and master.delete_confirm == 'simple':
|
||||||
|
|
||||||
|
@ -21,7 +23,9 @@
|
||||||
% endif
|
% endif
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
${form.render_included_templates()}
|
% if form is not Undefined:
|
||||||
|
${form.render_included_templates()}
|
||||||
|
% endif
|
||||||
|
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue