Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1647

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

Opravy:
- Pri pridavani zpravy moznost pridat obsah e-mailu a sms zpravy

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/messages.php
->label('Content of the message')
->rows(5)
->cols(100);
$form->html_textarea('email_text')
->label(__('Content of the message for E-mail').': '.
help::hint('content_of_message'))
->rows(5)
->cols(100);
$form->textarea('sms_text')
->label(__('Content of the message for SMS').': '.
help::hint('content_of_message'))
->rules('length[1,760]')
->style('width: 100%; max-width: 633px; height: 150px');
$form->submit('Add');
......
$message->type = Message_Model::USER_MESSAGE;
$message->self_cancel = htmlspecialchars($form_data['self_cancel']);
$message->ignore_whitelist = htmlspecialchars($form_data['ignore_whitelist']);
// email text
$email_text = trim($form_data['email_text']);
$email_text = empty($email_text) ? NULL : $email_text;
// sms text
$sms_text = trim(text::cs_utf2ascii(strip_tags($form_data['sms_text'])));
$sms_text = empty($sms_text) ? NULL : $sms_text;
// set vars
$message->email_text = $email_text;
$message->sms_text = $sms_text;
$message->text = $form_data['text'];
unset($form_data);
......
if ($message->type == 0)
{
$form->input('name')
->label(__('Message name').':')
->label('Message name')
->rules('required|length[3,200]')
->value($message->name);
->value($message->name)
->style('width: 600px');
}
if ($message->type == Message_Model::USER_MESSAGE ||
......
$message->type == Message_Model::UNALLOWED_CONNECTING_PLACE_MESSAGE)
{
$form->dropdown('self_cancel')
->label('User-cancelable'.
->label(__('User-cancelable').
': '.help::hint('self_cancel'))
->options($self_cancel)
->selected($message->self_cancel);
->selected($message->self_cancel)
->style('width: 600px');
$form->dropdown('ignore_whitelist')
->label(__('Ignore whitelist').
......
->label(__('Content of the message for SMS').': '.
help::hint('content_of_message'))
->rules('length[1,760]')
->style('width: 100%; height: 150px')
->style('width: 100%; max-width: 633px; height: 150px')
->value($message->sms_text);
}

Také k dispozici: Unified diff