Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gc config creation #212

Merged
merged 1 commit into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/Resources/views/Admin/GiftCardConfiguration/_form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@
</ul>
</div>
{{ form_row(form.pdfRenderingCss) }}
<div>
{% if resource is not null %}
{% if resource.id is not null %}
<div>
<label for="pdf_live_render_html_content">{{ 'setono_sylius_gift_card.form.gift_card_configuration.pdf_rendering_html'|trans }}</label>
<textarea id="pdf_live_render_html_content" disabled>{{ ssgc_get_pdf_template_content() }}</textarea>
{% endif %}
</div>
</div>

<button class="ui button primary labeled icon js-ssgc-apply-pdf-changes"
data-url="{{ path('setono_sylius_gift_card_admin_ajax_generate_pdf', {'id': resource.id}) }}">
<i class="icon check"></i>
{{ 'setono_sylius_gift_card.ui.apply'|trans }}
</button>
<button class="ui button primary labeled icon js-ssgc-apply-pdf-changes"
data-url="{{ path('setono_sylius_gift_card_admin_ajax_generate_pdf', {'id': resource.id}) }}">
<i class="icon check"></i>
{{ 'setono_sylius_gift_card.ui.apply'|trans }}
</button>

<button class="ui button primary labeled icon js-ssgc-load-default-pdf-css"
data-url="{{ path('setono_sylius_gift_card_admin_ajax_load_default_pdf_css', {'id': resource.id}) }}">
<i class="icon check"></i>
{{ 'setono_sylius_gift_card.ui.load_default_css'|trans }}
</button>
<button class="ui button primary labeled icon js-ssgc-load-default-pdf-css"
data-url="{{ path('setono_sylius_gift_card_admin_ajax_load_default_pdf_css', {'id': resource.id}) }}">
<i class="icon check"></i>
{{ 'setono_sylius_gift_card.ui.load_default_css'|trans }}
</button>
{% endif %}
</div>
<div class="column js-ssgc-live-render-container" style="height: 900px;">
<embed id="js-ssgc-live-render-box"
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/Shop/GiftCard/pdf.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set path = '' %}
{% if configuration.backgroundImage is not empty %}
{% if configuration.backgroundImage.path is not empty %}
{% set path = configuration.backgroundImage.path|imagine_filter('setono_sylius_gift_card_background') %}
{% endif %}

Expand Down