diff --git a/app/views/admin/communication/blocks/edit.html.erb b/app/views/admin/communication/blocks/edit.html.erb index 1457df71ed342a62a271f19194fafc8db0cb58ec..b1c1d9c62c791c778c3e3e3bb3ed5a624e77e99a 100644 --- a/app/views/admin/communication/blocks/edit.html.erb +++ b/app/views/admin/communication/blocks/edit.html.erb @@ -36,7 +36,8 @@ url: "<%= rails_direct_uploads_url.html_safe %>", blobUrlTemplate: "<%= rails_service_blob_url(":signed_id", ":filename").html_safe %>" }, - data: <%= @block.data.to_json.html_safe %> + data: <%= @block.data.to_json.html_safe %>, + defaultElement: <%= @block.template.element.default_data.to_json.html_safe %> } }, methods: { diff --git a/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb b/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb index 5817d1c3e3a7f3e7181e926c60e23985acf173aa..91becaa50b264d8acd162e1758818524452a8546 100644 --- a/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb @@ -2,9 +2,8 @@ layouts: Communication::Block::Template::Gallery::LAYOUTS, horizontal: true %> - <a class="<%= button_classes('mb-4') %>" - v-on:click="data.elements.push(<%= raw @block.template.element.default_data.to_s %>)"> + v-on:click="data.elements.push(defaultElement)"> <%= t '.add_image' %> </a>