first commit
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stEcardPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stEcardPlugin 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 stEcardPlugin
|
||||
* @subpackage actions
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: actions.class.php 7200 2010-08-02 12:49:54Z marek $
|
||||
* @author Michal Prochowski <michal.prochowski@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Klasa stEcardBackendActions
|
||||
*
|
||||
* @package stEcardPlugin
|
||||
* @subpackage actions
|
||||
*/
|
||||
class stEcardBackendActions extends stActions
|
||||
{
|
||||
/**
|
||||
* Wyświetla konfigurację modułu
|
||||
*/
|
||||
public function executeIndex()
|
||||
{
|
||||
$this->config = stConfig::getInstance($this->getContext());
|
||||
$i18n = $this->getContext()->getI18N();
|
||||
|
||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||
{
|
||||
$this->config->setFromRequest('ecard');
|
||||
$this->config->save();
|
||||
$this->setFlash('notice', $i18n->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin'));
|
||||
}
|
||||
|
||||
$this->labels = $this->getLabels();
|
||||
$this->config->load();
|
||||
}
|
||||
|
||||
public function validateIndex()
|
||||
{
|
||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||
{
|
||||
stAuthUsersListener::checkModificationCredentials($this, $this->getRequest(), $this->getModuleName());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Akcja w przypadku błędu w uzupełnianiu pól
|
||||
*/
|
||||
public function handleErrorIndex()
|
||||
{
|
||||
$this->config = stConfig::getInstance($this->getContext());
|
||||
$this->labels = $this->getLabels();
|
||||
return sfView::SUCCESS;
|
||||
}
|
||||
|
||||
protected function getLabels()
|
||||
{
|
||||
return array('ecard{ecard_id}' => 'Identyfikator', 'ecard{ecard_password}' => 'Hasło autoryzacji');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class stEcardBackendComponents extends sfComponents
|
||||
{
|
||||
|
||||
public function executeListMenu()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="list-menu">
|
||||
<ul>
|
||||
|
||||
<li class="selected">
|
||||
<?php echo link_to(__('eCard'),'stEcardBackend/index')?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php if (sfContext::getInstance()->getUser()->getCulture() == 'pl_PL'): ?>
|
||||
<a href="https://www.sote.pl/docs/ecard" target="_blank"><?php echo __('Dokumentacja'); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="https://www.soteshop.com/docs/ecard" target="_blank"><?php echo __('Documentation'); ?></a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="clr"></div>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php use_helper('I18N', 'stAdminGenerator', 'Validation') ?>
|
||||
<?php $protocol = stConfig::getInstance('stSecurityBackend')->get('ssl') ? 'https' : 'http' ?>
|
||||
<?php echo st_get_admin_head('stEcardPlugin', __('eCard', array()), __('', array()),array('stPayment')) ?>
|
||||
<?php st_view_slot_start('application-menu') ?>
|
||||
<?php st_include_component('stEcardBackend', 'listMenu') ?>
|
||||
<?php st_view_slot_end() ?>
|
||||
<?php st_include_partial('stAdminGenerator/message', array('labels' => $labels, 'i18n_catalogue' => 'stEcardBackend'));?>
|
||||
<?php echo form_tag('ecard/index', array('id' => 'sf_admin_config_form', 'name' => 'sf_admin_config_form', 'class' => 'admin_form')) ?>
|
||||
<fieldset>
|
||||
<div class="content">
|
||||
<div class="form-row<?php if($sf_request->hasError('ecard{ecard_id}')): ?> form-error<?php endif; ?>">
|
||||
<label for="ecard_ecard_password" class="required"><?php echo __('Identyfikator') ?></label>
|
||||
<div class="field">
|
||||
<?php if($sf_request->hasErrors()): ?>
|
||||
<div class="form-error-msg">
|
||||
<div class="form_error" id="error_for_ecard_id"> ↓ <?php echo $sf_request->getError('ecard{ecard_id}') ?> ↓</div>
|
||||
</div>
|
||||
<?php echo input_tag('ecard[ecard_id]', $sf_params->get('ecard[ecard_id]'), array('size' => '50')) ?>
|
||||
<?php else: ?>
|
||||
<?php echo input_tag('ecard[ecard_id]', $config->get('ecard_id'), array('size' => '50')) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="form-row<?php if($sf_request->hasError('ecard{ecard_password}')): ?> form-error<?php endif; ?>">
|
||||
<label for="ecard_ecard_password" class="required"><?php echo __('Hasło autoryzacji') ?></label>
|
||||
<div class="field">
|
||||
<?php if($sf_request->hasErrors()): ?>
|
||||
<div class="form-error-msg">
|
||||
<div class="form_error" id="error_for_ecard_password"> ↓ <?php echo $sf_request->getError('ecard{ecard_password}') ?> ↓</div>
|
||||
</div>
|
||||
<?php echo input_password_tag('ecard[ecard_password]', $sf_params->get('ecard[ecard_password]'), array('size' => '50')) ?>
|
||||
<?php else: ?>
|
||||
<?php echo input_password_tag('ecard[ecard_password]', $config->get('ecard_password'), array('size' => '50')) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<h2><?php echo __('Konfiguracja usługi') ?></h2>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<?php echo st_admin_get_form_field('ecard_notify_url', __('Adres powiadomienia POST'), $protocol.'://'.$sf_request->getHost().'/ecard/statusReport/'.stEcard::getPostSecureHash(), 'input_tag', array('readonly' => true, 'size' => 80, 'clipboard' => true)) ?>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo input_hidden_tag('ecard[transaction_fix]',$config->get('transaction_fix')) ?>
|
||||
<?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() ?>
|
||||
@@ -0,0 +1,7 @@
|
||||
fields:
|
||||
ecard{ecard_id}:
|
||||
required:
|
||||
msg: Proszę uzupełnić pole.
|
||||
ecard{ecard_password}:
|
||||
required:
|
||||
msg: Proszę uzupełnić pole.
|
||||
Reference in New Issue
Block a user