Revize 1713
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/testing/application/controllers/scheduler.php | ||
---|---|---|
|
||
$email_queue = $email_queue_model->get_current_queue();
|
||
|
||
if (!count($email_queue))
|
||
return; // do not connect to SMPT server for no reason (fixes #336)
|
||
|
||
$swift = email::connect();
|
||
|
||
foreach ($email_queue as $email)
|
freenetis/branches/testing/application/controllers/members.php | ||
---|---|---|
->options($arr_lock)
|
||
->selected($member->locked);
|
||
}
|
||
|
||
if ($member->id != Member_Model::ASSOCIATION &&
|
||
$this->acl_check_edit('Members_Controller', 'registration', $member->id))
|
||
{
|
||
$form->dropdown('registration')
|
||
->options(arr::rbool())
|
||
->selected($member->registration);
|
||
}
|
||
|
||
if ($this->acl_check_edit('Members_Controller', 'user_id'))
|
||
{
|
||
$form->dropdown('user_id')
|
||
... | ... | |
{
|
||
$member->locked = $form_data['locked'];
|
||
}
|
||
|
||
if ($member->id != Member_Model::ASSOCIATION &&
|
||
$this->acl_check_edit('Members_Controller', 'registration', $member->id))
|
||
{
|
||
$member->registration = $form_data['registration'];
|
||
}
|
||
|
||
if ($this->acl_check_edit('Members_Controller', 'user_id'))
|
||
$member->user_id = $form_data['user_id'];
|
||
... | ... | |
|
||
// member data
|
||
if ($this->acl_check_edit(get_class($this),'entrance_date',$member->id))
|
||
$member->entrance_date = date("Y-m-d",$form_data['entrance_date']);
|
||
{
|
||
if ($member->type == Member_Model::TYPE_APPLICANT)
|
||
$member->entrance_date = NULL;
|
||
else
|
||
$member->entrance_date = date("Y-m-d",$form_data['entrance_date']);
|
||
}
|
||
|
||
if ($this->acl_check_edit(get_class($this),'name',$member->id))
|
||
$member->name = $form_data['membername'];
|
freenetis/branches/testing/application/controllers/js.php | ||
---|---|---|
$this->address_point_streets();
|
||
$this->address_point_gps();
|
||
$this->domicile_toogle();
|
||
$this->member_type();
|
||
}
|
||
|
||
private function _js_members_edit()
|
||
... | ... | |
$this->address_point_streets();
|
||
$this->address_point_gps();
|
||
$this->domicile_toogle();
|
||
$this->member_type();
|
||
}
|
||
|
||
private function _js_members_fees_add($member_id = NULL, $fee_type_id = NULL)
|
||
... | ... | |
}
|
||
|
||
/**
|
||
* Adds javascript for handling of member type. (Form is changed according to type)
|
||
*
|
||
* @author Ondřej Fibich
|
||
*/
|
||
private function member_type()
|
||
{
|
||
$this->views['__pieces_member_type'] =
|
||
View::factory('js/__pieces/member_type')->render();
|
||
}
|
||
|
||
/**
|
||
* Calculator for VoIP calls
|
||
*
|
||
* @param integer $user_id
|
freenetis/branches/testing/application/views/js/__pieces/member_type.php | ||
---|---|---|
<?php
|
||
/**
|
||
* Member type javascript view.
|
||
* During adding/editing of member, toogle fields according to member type.
|
||
*
|
||
* @author Michal Kliment, Ondřej Fibich
|
||
*/
|
||
|
||
// IDE complementation
|
||
if (FALSE): ?><script type="text/javascript"><?php endif
|
||
|
||
?>
|
||
|
||
// on change of type change the form
|
||
$('select#type').change(function ()
|
||
{
|
||
var val = $(this).val();
|
||
var $entrance_date_row = $('th.entrance_date').parent();
|
||
|
||
// applicant - hide registration
|
||
if (val == '<?php echo Member_Model::TYPE_APPLICANT ?>')
|
||
{
|
||
$entrance_date_row.hide();
|
||
}
|
||
// default - show all
|
||
else
|
||
{
|
||
$entrance_date_row.show();
|
||
}
|
||
|
||
}).trigger('change');
|
Také k dispozici: Unified diff
Oprava:
- #336: SMTP - opakovane kontaktovani
- #334: Editace cekatele na clenstvi a neclena + editace odevzdani prihlasky