Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1716

Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)

Merge do trunku.

Oprava:

- fixes #336: SMTP - opakovane kontaktovani
- fixes #334: Editace cekatele na clenstvi a neclena + editace odevzdani prihlasky

Zobrazit rozdíly:

freenetis/trunk/kohana/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/trunk/kohana/application/controllers/members.php
// id of user who added member
$member->user_id = $this->session->get('user_id');
$member->comment = $form_data['comment'];
$member->entrance_date = date("Y-m-d",$form_data['entrance_date']);
if ($form_data['membername'] == '')
{
......
$member->qos_rate = $form_data['qos_rate'];
$member->entrance_fee = $form_data['entrance_fee'];
$member->debt_payment_rate = $form_data['debt_payment_rate'];
if ($member->type == Member_Model::TYPE_APPLICANT)
{
$member->entrance_date = NULL;
}
else
{
$member->entrance_date = date("Y-m-d",$form_data['entrance_date']);
}
// saving member
$member->save_throwable();
......
->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/trunk/kohana/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/trunk/kohana/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