first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<?php if ($type == 'list'): ?>
<?php use_helper('stCurrency') ?>
<?php echo st_format_price($gift_card->getAmount()) ?>
<?php else: ?>
<?php use_javascript('stPrice.js') ?>
<?php echo input_tag('gift_card[amount]', stPrice::round($gift_card->getAmount()), array('size' => 6, 'onchange' => 'this.value=stPrice.fixNumberFormat(this.value)')) ?>
<?php endif; ?>

View File

@@ -0,0 +1,28 @@
<?php
use_helper('stCategory');
$defaults = array();
if ($sf_request->hasErrors())
{
$parameters = $sf_request->getParameter('categories');
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
}
elseif (!$gift_card->isNew())
{
$defaults = GiftCardHasCategoryPeer::doSelectCategoriesForTokenInput($gift_card);
}
echo category_picker_input_tag('categories', $defaults, array('show_default' => false, 'allow_assign_parents_only' => true));
?>
<script>
jQuery(function($) {
$('.all_products').change(function() {
if ($(this).prop('checked')) {
$('#sf_fieldset_kategorie_i_producenci').hide();
} else {
$('#sf_fieldset_kategorie_i_producenci').show();
}
}).change();
});
</script>

View File

@@ -0,0 +1,10 @@
<?php
if ($type == 'list')
{
echo $gift_card->getCurrency();
}
else
{
echo object_select_tag($gift_card->getCurrency() ? $gift_card->getCurrency() : stCurrency::getInstance($sf_context)->getBackendMainCurrency(), 'getId', array('control_name' => 'gift_card[currency_id]', 'related_class' => 'Currency'));
}
?>

View File

@@ -0,0 +1,3 @@
<?php use_helper('stGiftCard') ?>
<?php echo st_gift_card_status_select_tag('filters[status]', isset($filters['status']) ? $filters['status'] : '', array('include_custom' => '---')) ?>

View File

@@ -0,0 +1,16 @@
<?php
use_helper('stUrl', 'stBackend');
if ($related_object instanceof GiftCard && !$related_object->isNew())
{
$url = url_for('@stGiftCardPlugin?action=edit&id='.$related_object->getId());
$name = $related_object->getCode();
$title =<<<HTML
<a href="$url"><span>$title <em>$name</em></span></a>
HTML;
}
include sfConfig::get('sf_module_cache_dir').'/autoStGiftCardBackend/templates/_header.php';
?>

View File

@@ -0,0 +1,7 @@
<?php if ($type == 'list'): ?>
<?php use_helper('stCurrency') ?>
<?php echo st_format_price($gift_card->getMinOrderAmount(), 0) ?>
<?php else: ?>
<?php use_javascript('stPrice.js') ?>
<?php echo input_tag('gift_card[min_order_amount]', $gift_card->getMinOrderAmount(), array('size' => 6, 'onchange' => 'this.value=stPrice.fixNumberFormat(this.value, 0)')) ?>
<?php endif; ?>

View File

@@ -0,0 +1,17 @@
<?php
use_helper('stProducer');
$defaults = array();
if ($sf_request->hasErrors())
{
$parameters = $sf_request->getParameter('producers');
$defaults = stJQueryToolsHelper::parseTokensFromRequest($parameters);
}
elseif (!$gift_card->isNew())
{
$defaults = GiftCardHasProducerPeer::doSelectProducerForTokenInput($gift_card);
}
echo producer_picker_input_tag('producers', $defaults);

View File

@@ -0,0 +1,7 @@
<?php use_helper('stGiftCard') ?>
<?php if ($type == 'list'): ?>
<?php echo st_gift_card_status_name($gift_card->getStatus()) ?>
<?php else: ?>
<?php echo st_gift_card_status_select_tag('gift_card[status]', $gift_card->getStatus()) ?>
<?php endif; ?>