Skip to content

Commit

Permalink
Merge pull request #212 from Setono/fix-gc-config-creation
Browse files Browse the repository at this point in the history
Fix gc config creation
  • Loading branch information
Roshyo authored May 2, 2022
2 parents 85d038c + eb288f2 commit dbff8f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
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

0 comments on commit dbff8f1

Please sign in to comment.