Revize 2352
Přidáno uživatelem David Raška před asi 10 roky(ů)
freenetis/branches/1.2/application/controllers/members.php | ||
---|---|---|
));
|
||
}
|
||
|
||
if ($this->acl_check_new(get_class($this), 'applicants'))
|
||
{
|
||
$grid->add_new_button('registration', 'Registration form', array
|
||
(
|
||
'title' => __('Registration form'),
|
||
));
|
||
}
|
||
|
||
if (!$hide_grid && $this->acl_check_edit('Members_Controller', 'registration'))
|
||
{
|
||
if (!$regs)
|
freenetis/branches/1.2/application/controllers/registration.php | ||
---|---|---|
public function index()
|
||
{
|
||
// if self-registration is not allow, redirect to login page
|
||
if (!$this->settings->get('self_registration') || $this->session->get('user_id', 0))
|
||
if ((!$this->session->get('user_id', 0) && !$this->settings->get('self_registration')) ||
|
||
($this->session->get('user_id', 0) && !$this->acl_check_new('Members_Controller', 'applicants'))
|
||
)
|
||
{
|
||
url::redirect('login');
|
||
}
|
||
... | ... | |
->class('join1');
|
||
|
||
$form->input('district')
|
||
->class('join2')
|
||
->rules('required');
|
||
->class('join2');
|
||
|
||
$form->input('street')
|
||
->label('Street')
|
||
... | ... | |
// commit transaction
|
||
$user->transaction_commit();
|
||
|
||
url::redirect('registration/complete');
|
||
if ($this->user_id)
|
||
{
|
||
status::success('Registration has been sended');
|
||
$this->redirect('members/show_all');
|
||
}
|
||
else
|
||
{
|
||
url::redirect('registration/complete');
|
||
}
|
||
}
|
||
catch (Exception $ex)
|
||
{
|
||
... | ... | |
}
|
||
}
|
||
|
||
$view = new View('registration/index');
|
||
$view->title = __('Registration form');
|
||
$view->form = $form->html();
|
||
$view->render(TRUE);
|
||
$headline = __('Registration form');
|
||
|
||
if ($this->user_id)
|
||
{
|
||
// breadcrumbs navigation
|
||
$breadcrumbs = breadcrumbs::add()
|
||
->link('members/show_all', 'Members',
|
||
$this->acl_check_view('Members_Controller','members'))
|
||
->disable_translation()
|
||
->text($headline);
|
||
|
||
$view = new View('main');
|
||
$view->title = $headline;
|
||
$view->breadcrumbs = $breadcrumbs->html();
|
||
$view->content = new View('registration/index2');
|
||
$view->content->form = $form->html();
|
||
$view->content->headline = $headline;
|
||
$view->render(TRUE);
|
||
}
|
||
else
|
||
{
|
||
$view = new View('registration/index');
|
||
$view->title = $headline;
|
||
$view->form = $form->html();
|
||
$view->render(TRUE);
|
||
}
|
||
}
|
||
|
||
/**
|
freenetis/branches/1.2/application/libraries/MY_Controller.php | ||
---|---|---|
*/
|
||
|
||
// list of registered applicants
|
||
if (Settings::get('self_registration') &&
|
||
if ((Settings::get('self_registration') || $pm->count_of_registered_members() > 0) &&
|
||
$this->acl_check_view('Members_Controller', 'members'))
|
||
{
|
||
$menu->addItem(
|
freenetis/branches/1.2/application/views/registration/index2.php | ||
---|---|---|
<h2><?php echo $headline ?></h2>
|
||
<br />
|
||
<?php echo $form ?>
|
freenetis/branches/1.2/db_upgrades/upgrade_1.2.0~alpha4.php | ||
---|---|---|
<?php defined('SYSPATH') or die('No direct script access.');
|
||
/*
|
||
* This file is part of open source system FreenetIS
|
||
* and it is released under GPLv3 licence.
|
||
*
|
||
* More info about licence can be found:
|
||
* http://www.gnu.org/licenses/gpl-3.0.html
|
||
*
|
||
* More info about project can be found:
|
||
* http://www.freenetis.org/
|
||
*
|
||
*/
|
||
|
||
|
||
/**
|
||
* Copies registration license text to registration form info
|
||
*
|
||
* @author David Raška <jeffraska@gmail.com>
|
||
*/
|
||
$upgrade_sql['1.2.0~alpha4'] = array
|
||
(
|
||
"INSERT INTO `axo` (`id`, `section_value`, `value`, `name`)
|
||
SELECT MAX(`id`)+1, 'Members_Controller', 'applicants', 'Applicants registration' FROM `axo`;",
|
||
|
||
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES
|
||
(38, 'Members_Controller', 'applicants');"
|
||
|
||
); // end of $upgrade_sql['1.2.0~alpha4']
|
freenetis/branches/1.2/version.php | ||
---|---|---|
* The current version of FreenetIS.
|
||
* This value must be changed by developers in a new release of FreenetIS.
|
||
*/
|
||
define('FREENETIS_VERSION', '1.2.0~alpha3');
|
||
define('FREENETIS_VERSION', '1.2.0~alpha4');
|
Také k dispozici: Unified diff
Upravy:
- refs #864: Moznost pridavani zajemce administratorem.