50 lines
2.9 KiB
PHP
50 lines
2.9 KiB
PHP
<?php use_helper('I18N', 'stAdminGenerator', 'Validation');?>
|
|
<?php echo st_get_admin_head('stPlatnosciPlPlugin', __('PayU', array()), __('',array()),array('stPayment'));?>
|
|
<?php st_view_slot_start('application-menu') ?>
|
|
<?php st_include_component('stPlatnosciPlBackend', 'listMenu') ?>
|
|
<?php st_view_slot_end() ?>
|
|
<?php st_include_partial('stAdminGenerator/message', array('labels' => $labels));?>
|
|
<?php echo form_tag('platnoscipl/index', array('id' => 'sf_admin_config_form', 'name' => 'sf_admin_config_form', 'class' => 'admin_form'));?>
|
|
<fieldset>
|
|
<div class="content">
|
|
<div class="row">
|
|
<?php echo st_admin_get_form_field('config[autoredirect]', __('Automatyczne przekierowanie'), 1, 'checkbox_tag', array('checked' => $config->get('autoredirect'), 'help' => __('Przekierowuje automatycznie na stronę płatności po złożeniu zamówienia'))) ?>
|
|
</div>
|
|
<div class="clr"></div>
|
|
</div>
|
|
</fieldset>
|
|
<?php foreach ($currencies as $currency): $shortcut = $currency->getShortcut(); $current = $config->get($shortcut); $enabled = $current ? $current['enabled'] : false; ?>
|
|
<fieldset>
|
|
<h2><?php echo __('Waluta');?> <?php echo $shortcut ?></h2>
|
|
<div class="content">
|
|
<div class="row">
|
|
<?php echo st_admin_get_form_field('config['.$shortcut.'][enabled]', __('Aktywuj'), 1, 'checkbox_tag', array('checked' => $enabled, 'class' => 'payu_enable', 'size' => '60')) ?>
|
|
<div class="clr"></div>
|
|
</div>
|
|
<div class="row">
|
|
<?php echo st_admin_get_form_field('config['.$shortcut.'][pos_id]', __('Numer PosId'), $current ? $current['pos_id'] : '', 'input_tag', array('required' => true, 'disabled' => !$enabled, 'size' => '60')) ?>
|
|
<div class="clr"></div>
|
|
</div>
|
|
<div class="row">
|
|
<?php echo st_admin_get_form_field('config['.$shortcut.'][md5_secound_key]', __('Drugi klucz (md5)'), $current ? $current['md5_secound_key'] : '', 'input_tag', array('required' => true, 'disabled' => !$enabled, 'size' => '60')) ?>
|
|
<div class="clr"></div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
<?php endforeach ?>
|
|
<?php echo st_get_admin_actions(array(
|
|
array('type' => 'save', 'label' => __('Zapisz', null, 'stAdminGeneratorPlugin'))
|
|
)) ?>
|
|
</form>
|
|
<div class="clr"></div>
|
|
<?php echo st_get_admin_foot();?>
|
|
<script type="text/javascript">
|
|
jQuery(function($) {
|
|
$('.payu_enable').change(function() {
|
|
var checkbox = $(this);
|
|
|
|
checkbox.closest('.content').find('input[type=text]').attr('disabled', !checkbox.prop('checked'))
|
|
});
|
|
});
|
|
</script>
|