mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	Feature: set parameters for add_address as global
The parameter `window.addaddress` is now global and can be reached to all page. This ensure backward compatibility.
This commit is contained in:
		| @@ -22,7 +22,6 @@ | ||||
|             '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}'); | ||||
|         }); | ||||
|         window.activity = {{ activity_json|json_encode|raw }}; | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|     {{ encore_entry_script_tags('vue_activity') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -37,7 +37,6 @@ | ||||
|             '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}'); | ||||
|         }); | ||||
|         window.activity = {{ activity_json|json_encode|raw }}; | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|     {{ encore_entry_script_tags('vue_activity') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -18,7 +18,6 @@ | ||||
|     {{ encore_entry_script_tags('mod_async_upload') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.activity = {{ activity_json|json_encode|raw }}; | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|         {% if default_location is not null %}window.default_location_id = {{ default_location.id }}{% endif %}; | ||||
|     </script> | ||||
|     {{ encore_entry_script_tags('vue_activity') }} | ||||
|   | ||||
| @@ -21,7 +21,6 @@ | ||||
|             '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}'); | ||||
|         }); | ||||
|         window.activity = {{ activity_json|json_encode|raw }}; | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|     {{ encore_entry_script_tags('vue_activity') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -9,6 +9,11 @@ | ||||
|     {% block head_custom %}{% endblock %} | ||||
|     <link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon"> | ||||
|  | ||||
|     <script type="application/javascript"> | ||||
|         {# this is global data, in use for all js app #} | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|  | ||||
|     {{ encore_entry_link_tags('mod_bootstrap') }} | ||||
|     {{ encore_entry_link_tags('mod_forkawesome') }} | ||||
|     {{ encore_entry_link_tags('mod_ckeditor5') }} | ||||
| @@ -109,7 +114,6 @@ | ||||
|             }); | ||||
|             chill.categoryLinkParentChildSelect(); | ||||
|         }); | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|  | ||||
|     {% block js %}<!-- nothing added to js -->{% endblock %} | ||||
|   | ||||
| @@ -10,7 +10,6 @@ | ||||
|    <script type="text/javascript"> | ||||
|       window.accompanyingCourseId = {{ accompanyingCourse.id|e('js') }}; | ||||
|       window.vueRootComponent = 'app'; | ||||
|       window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|    </script> | ||||
|    {{ encore_entry_script_tags('vue_accourse') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -19,7 +19,6 @@ | ||||
|     <script type="text/javascript"> | ||||
|       window.household_members_editor_data = {{ data|json_encode|raw }}; | ||||
|       window.household_members_editor_expand_suggestions = {{ expandSuggestions }}; | ||||
|       window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
|     {{ encore_entry_script_tags('vue_household_members_editor') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -143,9 +143,6 @@ | ||||
|     {{ encore_entry_script_tags('page_suggest_names') }} | ||||
|     {{ encore_entry_script_tags('page_create_person') }} | ||||
|     {{ encore_entry_script_tags('mod_input_address') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
| {% endblock js %} | ||||
|  | ||||
| {% block css %} | ||||
|   | ||||
| @@ -22,9 +22,6 @@ | ||||
|  | ||||
| {% block js %} | ||||
|     {{ encore_entry_script_tags('mod_input_address') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block css %} | ||||
|   | ||||
| @@ -38,9 +38,6 @@ | ||||
|  | ||||
| {% block js %} | ||||
|     {{ encore_entry_script_tags('mod_input_address') }} | ||||
|     <script type="text/javascript"> | ||||
|         window.addaddress = {{ add_address|json_encode|raw }}; | ||||
|     </script> | ||||
| {% endblock %} | ||||
|  | ||||
| {% block css %} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user