update
This commit is contained in:
@@ -108,6 +108,7 @@ class DictionaryController extends MainController implements ControllerInterface
|
||||
//'User' => array('User' => 'Index'),
|
||||
'Słowniki' => array('Dictionary' => 'Index'),
|
||||
'Zmienne serwisu' => array('Setup' => 'Index'),
|
||||
'Ustawienia formularza' => array('FormSettings' => 'Index'),
|
||||
// 'Kategorie produktów' => array('ProductCategory' => 'Index'),
|
||||
// 'Serie produktów' => array('ProductSeries' => 'Index'),
|
||||
// 'Materiał produktów' => array('ProductSpec' => 'Index', 'type' => 2),
|
||||
@@ -150,4 +151,4 @@ class DictionaryController extends MainController implements ControllerInterface
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
61
_rejestracja/Admin/controller/FormSettingsController.php
Normal file
61
_rejestracja/Admin/controller/FormSettingsController.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
class FormSettingsController extends MainController implements ControllerInterface {
|
||||
|
||||
public function IndexAction($param) {
|
||||
$errors = array();
|
||||
|
||||
if (Request::GetPost('doFormSettingsEdit')) {
|
||||
$post = Request::GetAllPost();
|
||||
$errors = RegistrationFormSettings::Validate($post);
|
||||
|
||||
if (empty($errors)) {
|
||||
RegistrationFormSettings::SaveSettings($post);
|
||||
$this->smarty->assign('info', 'Zapisano ustawienia formularza.');
|
||||
$this->smarty->assign('type', 'ok');
|
||||
} else {
|
||||
$this->smarty->assign('info', 'Popraw pola formularza.');
|
||||
$this->smarty->assign('type', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
$settings = RegistrationFormSettings::GetSettings();
|
||||
$this->smarty->assign('settings', $settings);
|
||||
$this->smarty->assign('errors', $errors);
|
||||
}
|
||||
|
||||
public function preDispatch($param) {
|
||||
$this->RunShared('Auth', $param);
|
||||
$this->Run($param);
|
||||
$admin = AuthDAL::GetAdmin();
|
||||
$this->user = $admin;
|
||||
|
||||
$this->smarty->assign('titleAdmin', 'Administracja');
|
||||
$struct = array(
|
||||
'Słowniki' => array('Dictionary' => 'Index'),
|
||||
'Zmienne serwisu' => array('Setup' => 'Index'),
|
||||
'Ustawienia formularza' => array('FormSettings' => 'Index'),
|
||||
);
|
||||
|
||||
$this->smarty->assign('structure', $this->renderStruct($struct));
|
||||
}
|
||||
|
||||
private function renderStruct($struct) {
|
||||
$return = '';
|
||||
|
||||
foreach ($struct as $k => $row) {
|
||||
$return .= '<li><a href="' . Router::GenerateUrl('dictpig', $row) . '">' . $k . '</a></li>';
|
||||
}
|
||||
|
||||
$html = '<ul>';
|
||||
$html .= $return;
|
||||
$html .= '</ul>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function postDispatch($param) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -144,6 +144,7 @@ class SetupController extends MainController implements ControllerInterface {
|
||||
//'User' => array('User' => 'Index'),
|
||||
'Słowniki' => array('Dictionary' => 'Index'),
|
||||
'Zmienne serwisu' => array('Setup' => 'Index'),
|
||||
'Ustawienia formularza' => array('FormSettings' => 'Index'),
|
||||
// 'Kategorie produktów' => array('ProductCategory' => 'Index'),
|
||||
// 'Serie produktów' => array('ProductSeries' => 'Index'),
|
||||
// 'Materiał produktów' => array('ProductSpec' => 'Index', 'type' => 2),
|
||||
@@ -179,4 +180,4 @@ class SetupController extends MainController implements ControllerInterface {
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user