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,69 @@
<?php
/**
* SOTESHOP/stDotpayPlugin
*
* Ten plik należy do aplikacji stDotpayPlugin opartej na licencji (Professional License SOTE).
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
*
* @package stDotpayPlugin
* @subpackage actions
* @copyright SOTE (www.sote.pl)
* @license http://www.sote.pl/license/sote (Professional License SOTE)
* @version $Id: actions.class.php 7193 2010-08-02 12:43:35Z marek $
* @author Michal Prochowski <michal.prochowski@sote.pl>
*/
/**
* Klasa stDotpayBackendActions
*
* @package stDotpayPlugin
* @subpackage actions
*/
class stDotpayBackendActions extends stActions
{
public function executeIndex()
{
$this->stDotpay = new stDotpay();
$i18n = $this->getContext()->getI18N();
$this->config = stConfig::getInstance($this->getContext(), array('culture' => $this->getRequestParameter('culture', stLanguage::getOptLanguage())));
if ($this->getRequest()->getMethod() == sfRequest::POST)
{
$this->config->setFromRequest('config');
$this->config->save();
$this->setFlash('notice', $i18n->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin'));
}
$this->config->load();
$this->labels = $this->getLabels();
}
public function validateIndex()
{
if ($this->getRequest()->getMethod() == sfRequest::POST)
{
stAuthUsersListener::checkModificationCredentials($this, $this->getRequest(), $this->getModuleName());
}
return true;
}
public function handleErrorIndex()
{
$this->stDotpay = new stDotpay();
$this->config = stConfig::getInstance($this->getContext());
$this->labels = $this->getLabels();
return sfView::SUCCESS;
}
public function getLabels()
{
return array('config{dotpay_id}' => 'Identyfikator', 'config{pin}' => 'Numer PIN do weryfikacji płatności');
}
}

View File

@@ -0,0 +1,13 @@
<?php
class stDotpayBackendComponents extends sfComponents
{
public function executeListMenu()
{
}
}
?>

View File

@@ -0,0 +1,19 @@
<div class="list-menu">
<ul>
<li class="selected">
<?php echo link_to(__('Dotpay'),'stDotpayBackend/index')?>
</li>
<li>
<?php if (sfContext::getInstance()->getUser()->getCulture() == 'pl_PL'): ?>
<a href="https://www.sote.pl/docs/dotpay" target="_blank"><?php echo __('Dokumentacja'); ?></a>
<?php else: ?>
<a href="https://www.soteshop.com/docs/dotpay" target="_blank"><?php echo __('Documentation'); ?></a>
<?php endif; ?>
</li>
</ul>
</div>
<div class="clr"></div>

View File

@@ -0,0 +1,28 @@
<?php use_helper('I18N', 'stAdminGenerator', 'Validation') ?>
<?php echo st_get_admin_head('stDotpayPlugin', __('Dotpay'), array('culture' => $config->getCulture()), array('stPayment')) ?>
<?php st_view_slot_start('application-menu') ?>
<?php st_include_component('stDotpayBackend', 'listMenu') ?>
<?php st_view_slot_end() ?>
<?php st_include_partial('stAdminGenerator/message', array('labels' => $labels));?>
<?php echo form_tag('dotpay/index?culture='.$config->getCulture(), array('id' => 'sf_admin_config_form', 'name' => 'sf_admin_config_form', 'class' => 'admin_form'));?>
<fieldset>
<div class="content">
<?php if (SF_ENVIRONMENT == 'dev' || $sf_request->hasParameter('debug')): ?>
<?php echo st_admin_get_form_field('config[test]', __('Tryb testowy'), 1, 'checkbox_tag', array('checked' => $config->get('test'))) ?>
<?php endif ?>
<?php echo st_admin_get_form_field('config[dotpay_id]', __('Identyfikator'), $config->get('dotpay_id'), 'input_tag', array('required' => true)) ?>
<?php echo st_admin_get_form_field('config[pin]', __('Numer PIN do weryfikacji płatności'), $config->get('pin'), 'input_password_tag', array('required' => true)) ?>
<?php echo st_admin_get_form_field('config[shop_name]', __('Nazwa sklepu'), $config->get('shop_name')) ?>
<?php echo st_admin_get_form_field('config[button_back_text]', __('Tekst przycisku powrotu do sklepu'), $config->get('button_back_text')) ?>
</div>
</fieldset>
<?php echo st_get_admin_actions_head('style="margin-top: 10px; float: right"') ?>
<?php echo st_get_admin_action('save', __('Zapisz', array(), 'stAdminGeneratorPlugin'), null, array('name' => 'save')) ?>
<?php echo st_get_admin_actions_foot() ?>
</form>
<?php echo st_get_admin_foot() ?>

View File

@@ -0,0 +1,7 @@
fields:
config{dotpay_id}:
required:
msg: Proszę uzupełnić pole.
config{pin}:
required:
msg: Proszę uzupełnić pole.