homegrade_theme_production/includes/forms/template-field-order-brochures.php

50 lines
1.9 KiB
PHP

<?php
?>
<fieldset class="field-order-paper-publications">
<?php
?>
<?php foreach ($this->choices as $index => $brochurePost) : ?>
<?php
$thematique = getPostMainThematique($brochurePost['ID']);
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $thematique->term_id);
$brochure_pdf_link = get_field('brochure_pdf', $brochurePost['ID']);
?>
<div class=" gchoice brochure-order-field">
<div class="thematique-tag thematique-tag--<?php echo $thematique->slug ?>">
<?php if ($thematiqueCover && $thematiqueCover['icon']) : ?>
<img class="thematique-icon" src="<?php echo $thematiqueCover['icon']['url'] ?>" alt="">
<?php endif; ?>
<p>
<?php echo $thematique->name ?>
</p>
</div>
<legend class="brochure-legend gform-field-label gform-field-label--type-inline"><?php echo $brochure_pdf_link['title'] ?></legend>
<a class="preview-brochure" href="<?php echo get_the_permalink($brochurePost['ID']) ?>" target="_blank"><?php echo __("Voir la brochure", "homegrade-theme__texte-fonctionnel") ?></a>
<div class="inputs-container">
<div class="publications-amount-fr">
<label id="publications-amount__label-fr" for="<?php echo 'input_' . $id . '[]' ?>" title="<?php echo __("Quantité désiré de brochures en Français", "homegrade-theme__texte-fonctionnel") ?>">fr</label>
<input type="number" size="1" min="0" name="<?php echo 'input_' . $id . '[]' ?>" />
</div>
<div class="publications-amount publications-amount-nl">
<label id="publications-amount__label-nl" for="<?php echo 'input_' . $id . '[]' ?>" title="<?php echo __("Quantité désiré de brochures en Néerlandais", "homegrade-theme__texte-fonctionnel") ?>">nl</label>
<input type="number" size="1" min="0" name="<?php echo 'input_' . $id . '[]' ?>" />
</div>
</div>
</div>
<div class="gchoice brochure-order-field">
</div>
<?php endforeach; ?>
</fieldset>