Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2184

Přidáno uživatelem David Raška před asi 11 roky(ů)

Opravy:
- fixes #764: Oprava pridavani tarifu clenovi

Zobrazit rozdíly:

freenetis/branches/1.1/application/controllers/members_fees.php
$form_data = $form->as_array();
$members_fee = new Members_fee_Model();
try
{
$members_fee->transaction_start();
$member = new Member_Model($form_data['member_id']);
$from = $form_data['from'];
$to = $form_data['to'];
$from = date('Y-m-d', $form_data['from']);
$to = date('Y-m-d', $form_data['to']);
// to is empthy? uses fee's end date
if ($to == '')
......
->rules('required')
->style('width: 620px');
$form->input('from')
$form->date('from')
->label('Date from')
->rules('required|valid_date_string')
->rules('required')
->callback(array($this, 'valid_from'))
->value($members_fee->activation_date);
->value(strtotime($members_fee->activation_date));
$form->input('to')
$form->date('to')
->label('Date to')
->rules('required|valid_date_string')
->rules('required')
->callback(array($this, 'valid_to'))
->value($members_fee->deactivation_date);
->value(strtotime($members_fee->deactivation_date));
$form->textarea('comment')
->value($members_fee->comment);
......
{
$members_fee->transaction_start();
$members_fee->activation_date = $form_data['from'];
$members_fee->deactivation_date = $form_data['to'];
$members_fee->activation_date = date('Y-m-d', $form_data['from']);
$members_fee->deactivation_date = date('Y-m-d', $form_data['to']);
$members_fee->comment = $form_data['comment'];
$members_fee->save_throwable();
......
self::error(PAGE);
}
$from = trim($input->value);
$from = date('Y-m-d', trim($input->value));
$to = trim($this->input->post('to'));
// members_fee_id is set only if is callback call from edit function
......
self::error(PAGE);
}
$value = trim($input->value);
$value = date('Y-m-d', trim($input->value));
$fee = new Fee_Model($this->input->post('fee_id'));

Také k dispozici: Unified diff