first commit
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stLukasPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stLukasPlugin 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 stLukasPlugin
|
||||
* @subpackage actions
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: actions.class.php 10 2009-08-24 09:32:18Z michal $
|
||||
* @author Michal Prochowski <michal.prochowski@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Klasa stLukasBackendActions
|
||||
*
|
||||
* @package stLukasPlugin
|
||||
* @subpackage actions
|
||||
*/
|
||||
class stLukasBackendActions extends stActions
|
||||
{
|
||||
/**
|
||||
* Wyświetla konfigurację modułu
|
||||
*/
|
||||
public function executeIndex()
|
||||
{
|
||||
$this->webRequest = new stWebRequest();
|
||||
$context = $this->getContext();
|
||||
$this->config = stConfig::getInstance($context);
|
||||
|
||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||
{
|
||||
$this->config->setFromRequest('config');
|
||||
$this->config->save();
|
||||
$this->setFlash('notice', $context->getI18N()->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin'));
|
||||
}
|
||||
$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ó
|
||||
*/
|
||||
public function handleErrorIndex()
|
||||
{
|
||||
$this->webRequest = new stWebRequest();
|
||||
$context = $this->getContext();
|
||||
$this->config = stConfig::getInstance($context);
|
||||
$this->labels = array('config{param_profile}' => $context->getI18n()->__('Identyfikator'));
|
||||
return sfView::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class stLukasBackendComponents extends sfComponents
|
||||
{
|
||||
|
||||
public function executeListMenu()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="list-menu">
|
||||
<ul>
|
||||
|
||||
<li class="selected">
|
||||
<?php echo link_to(__('Credit Agricole Raty'),'stLukasBackend/index')?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php if (sfContext::getInstance()->getUser()->getCulture() == 'pl_PL'): ?>
|
||||
<a href="https://www.sote.pl/docs/credit_agricole_raty" target="_blank"><?php echo __('Dokumentacja'); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="https://www.soteshop.com/docs/credit_agricole_raty" target="_blank"><?php echo __('Documentation'); ?></a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="clr"></div>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php use_helper('I18N', 'stAdminGenerator', 'Validation');?>
|
||||
<?php $protocol = stConfig::getInstance('stSecurityBackend')->get('ssl') ? 'https' : 'http' ?>
|
||||
<?php echo st_get_admin_head('stLukasPlugin', __('Credit Agricole Raty'), __('',array()),array('stPayment'));?>
|
||||
<?php st_view_slot_start('application-menu') ?>
|
||||
<?php st_include_component('stLukasBackend', 'listMenu') ?>
|
||||
<?php st_view_slot_end() ?>
|
||||
<?php st_include_partial('stAdminGenerator/message', array('i18n_catalogue' => 'stLukasBackend'));?>
|
||||
<?php echo form_tag('lukas/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('config{param_profile}')):?> form-error<?php endif;?>">
|
||||
<?php echo label_for('config[param_profile]', __('Identyfikator'), array('class' => 'required'));?>
|
||||
<div class="field">
|
||||
<?php if($sf_request->hasErrors()):?>
|
||||
<div class="form-error-msg">
|
||||
<div class="form_error" id="error_for_config_id"> ↓ <?php echo $sf_request->getError('config{param_profile}') ?> ↓</div>
|
||||
</div>
|
||||
<?php echo input_tag('config[param_profile]', $sf_params->get('config[param_profile]'), array('size' => '50'));?>
|
||||
<?php else:?>
|
||||
<?php echo input_tag('config[param_profile]', $config->get('param_profile'), array('size' => '50'));?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="form-row <?php if($sf_request->hasError('config{shop_name}')):?> form-error<?php endif;?>" >
|
||||
<?php echo label_for('config[shop_name]', __('Nazwa sklepu'));?>
|
||||
<div class="field">
|
||||
<?php if($sf_request->hasErrors()):?>
|
||||
<?php echo input_tag('config[shop_name]', $sf_params->get('config[shop_name]'), array('size' => '50'));?>
|
||||
<?php else:?>
|
||||
<?php echo input_tag('config[shop_name]', $config->get('shop_name'), array('size' => '50'));?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<h2><?php echo __('Adresy eWniosku i powrotów');?></h2>
|
||||
<div class="content">
|
||||
|
||||
<div class="row">
|
||||
<?php echo st_admin_get_form_field('field1', __('Adres eWniosku, procedury i symulatora'), $protocol.'://'.$sf_request->getHost().'/credit-agricole/ewniosek', 'input_tag', array('readonly' => true, 'size' => 80, 'clipboard' => true)) ?>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo st_admin_get_form_field('field2', __('Adres powrotu po złożeniu wniosku'), $protocol.'://'.$sf_request->getHost().'/credit-agricole/returnSuccess', 'input_tag', array('readonly' => true, 'size' => 80, 'clipboard' => true)) ?>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo st_admin_get_form_field('field3', __('Adres powrotu po rezygnacji'), $protocol.'://'.$sf_request->getHost().'/credit-agricole/returnFail', 'input_tag', array('readonly' => true, 'size' => 80, 'clipboard' => true)) ?>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<?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,4 @@
|
||||
fields:
|
||||
config{param_profile}:
|
||||
required:
|
||||
msg: Proszę uzupełnić pole.
|
||||
Reference in New Issue
Block a user