diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index a3b0225d6f..978b604a6f 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -418,7 +418,7 @@ class Display * @param bool Whether to XSS-filter or not * @return string Message wrapped into an HTML div */ - public static function return_message($message, $type='normal', $filter = true) + public static function return_message($message, $type = 'normal', $filter = true) { if ($filter) { $message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding()); @@ -712,9 +712,9 @@ class Display /** * Returns the htmlcode for a tag (h3, h1, div, a, button), etc * - * @param string $image the filename of the file (in the main/img/ folder - * @param string $alt_text the alt text (probably a language variable) - * @param array additional attributes (for instance height, width, onclick, ...) + * @param string $tag the tag name + * @param string $content the tag's content + * @param array $additional_attributes (for instance height, width, onclick, ...) * @author Julio Montoya 2010 */ public static function tag($tag, $content, $additional_attributes = array()) { diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index 713eac0eca..ba44e940c2 100755 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -339,7 +339,6 @@ EOT; * A rule is attached to check for unwanted HTML * @param string $name * @param string $label The label for the form-element - * @param string $name The element name * @param boolean $required (optional) Is the form-element required (default=true) * @param boolean $full_page (optional) When it is true, the editor loads completed html code for a full page. * @param array $editor_config (optional) Configuration settings for the online editor. diff --git a/plugin/ticket/database.php b/plugin/ticket/database.php index 9d3dce07c8..d778e5bc8a 100644 --- a/plugin/ticket/database.php +++ b/plugin/ticket/database.php @@ -170,11 +170,11 @@ $sql = "CREATE TABLE IF NOT EXISTS ".$table." ( Database::query($sql); //Default status $defaultStatus = array( - 'NAT' => $objPlugin->get_lang('StsNew'), - 'PND' => $objPlugin->get_lang('StsPending'), - 'XCF' => $objPlugin->get_lang('StsUnconfirmed'), - 'CLS' => $objPlugin->get_lang('StsClose'), - 'REE' => $objPlugin->get_lang('StsForwarded') + 'NAT' => $objPlugin->get_lang('StatusNew'), + 'PND' => $objPlugin->get_lang('StatusPending'), + 'XCF' => $objPlugin->get_lang('StatusUnconfirmed'), + 'CLS' => $objPlugin->get_lang('StatusClose'), + 'REE' => $objPlugin->get_lang('StatusForwarded') ); $i = 1; diff --git a/plugin/ticket/lang/english.php b/plugin/ticket/lang/english.php index 055a980171..907906cba5 100644 --- a/plugin/ticket/lang/english.php +++ b/plugin/ticket/lang/english.php @@ -37,11 +37,11 @@ $strings['Optional'] = "Optional"; $strings['ErrorRegisterMessage'] = "The ticket could not be created"; $strings['Source'] = "Source"; $strings['DeniedAccess'] = "Unauthorized access."; -$strings['StsNew'] = "New"; -$strings['StsPending'] = "Pending"; -$strings['StsUnconfirmed'] = "Unconfirmed"; -$strings['StsClose'] = "Closed"; -$strings['StsForwarded'] = "Resent"; +$strings['StatusNew'] = "New"; +$strings['StatusPending'] = "Pending"; +$strings['StatusUnconfirmed'] = "Unconfirmed"; +$strings['StatusClose'] = "Closed"; +$strings['StatusForwarded'] = "Resent"; $strings['Priority'] = "Priority"; $strings['PriorityHigh'] = "High"; $strings['PriorityNormal'] = "Normal"; @@ -81,4 +81,6 @@ $strings['TicketWasThisAnswerSatisfying'] = "Was this answer satisfactory?"; $strings['TicketDetail'] = "Ticket details"; $strings['AreYouSure'] = "Are you sure?"; $strings['allow_student_add'] = "Allow students to generate tickets"; -?> +$strings['PleaseBeforeRegisterATicketSelectOneUser'] = "Please select a user before you register a ticket."; +$strings['RequestConfirmation'] = "Request confirmation"; + diff --git a/plugin/ticket/lang/french.php b/plugin/ticket/lang/french.php index 97a5d169b0..e22a32bff4 100644 --- a/plugin/ticket/lang/french.php +++ b/plugin/ticket/lang/french.php @@ -37,11 +37,11 @@ $strings['Optional'] = "Optionnel"; $strings['ErrorRegisterMessage'] = "Le ticket n'a pas pu être enregistré"; $strings['Source'] = "Source"; $strings['DeniedAccess'] = "Accès non autorisé."; -$strings['StsNew'] = "Nouveau"; -$strings['StsPending'] = "En attente"; -$strings['StsUnconfirmed'] = "À confirmer"; -$strings['StsClose'] = "Fermé"; -$strings['StsForwarded'] = "Réenvoyé"; +$strings['StatusNew'] = "Nouveau"; +$strings['StatusPending'] = "En attente"; +$strings['StatusUnconfirmed'] = "À confirmer"; +$strings['StatusClose'] = "Fermé"; +$strings['StatusForwarded'] = "Réenvoyé"; $strings['Priority'] = "Priorité"; $strings['PriorityHigh'] = "Haute"; $strings['PriorityNormal'] = "Normale"; @@ -81,4 +81,6 @@ $strings['TicketWasThisAnswerSatisfying'] = "La réponse au ticket est-elle sati $strings['TicketDetail'] = "Détails du ticket"; $strings['AreYouSure'] = "Êtes-vous certain?"; $strings['allow_student_add'] = "Permettre à l'étudiant de générer des tickets"; -?> +$strings['PleaseBeforeRegisterATicketSelectOneUser'] = "Veuillez sélectionner un utilisateur avant d'enregistrer un ticket."; +$strings['RequestConfirmation'] = "Demander confirmation"; + diff --git a/plugin/ticket/lang/spanish.php b/plugin/ticket/lang/spanish.php index 9d3377b5c5..c810bb306b 100755 --- a/plugin/ticket/lang/spanish.php +++ b/plugin/ticket/lang/spanish.php @@ -39,11 +39,11 @@ $strings['ErrorRegisterMessage'] = "No se pudo registrar su ticket"; $strings['Source'] = "Fuente"; $strings['DeniedAccess'] = "Acceso denegado."; // Status Tickets -$strings['StsNew'] = "Nuevo"; -$strings['StsPending'] = "Pendiente"; -$strings['StsUnconfirmed'] = "Por Confirmar"; -$strings['StsClose'] = "Cerrado"; -$strings['StsForwarded'] = "Reenviado"; +$strings['StatusNew'] = "Nuevo"; +$strings['StatusPending'] = "Pendiente"; +$strings['StatusUnconfirmed'] = "Por Confirmar"; +$strings['StatusClose'] = "Cerrado"; +$strings['StatusForwarded'] = "Reenviado"; // Priority $strings['Priority'] = "Prioridad"; $strings['PriorityHigh'] = "Alta"; @@ -86,3 +86,6 @@ $strings['TicketDetail'] = "Detalle del Ticket"; $strings['AreYouSure'] = "¿Está seguro?"; $strings['allow_student_add'] = "Permitir al studiante generar Tickets"; +$strings['PleaseBeforeRegisterATicketSelectOneUser'] = "Por favor, antes de registrar un Ticket seleccione un usuario."; +$strings['RequestConfirmation'] = "Solicitar confirmación"; + diff --git a/plugin/ticket/src/course_user_list.php b/plugin/ticket/src/course_user_list.php index a909c1fe64..4b4b2eca4e 100644 --- a/plugin/ticket/src/course_user_list.php +++ b/plugin/ticket/src/course_user_list.php @@ -11,25 +11,38 @@ $language_file = array('registration'); require_once '../config.php'; $plugin = TicketPlugin::create(); -$user_id = intval($_GET['user_id']); -$user_info = api_get_user_info($user_id); -$courses_list = CourseManager::get_courses_list_by_user_id($user_id, false, true); -?> -
-
:
-
-
-
-
:
-
- -
-
+$userId = intval($_GET['user_id']); +$userInfo = api_get_user_info($userId); + +$coursesList = CourseManager::get_courses_list_by_user_id($userId, false, true); +$arrCourseList = array(get_lang('Select')); +//Course List +foreach ($coursesList as $key => $course) { + $courseInfo = CourseManager::get_course_information($course['code']); + $arrCourseList[$courseInfo['code']] = $courseInfo['title']; +} +//End Course List + + +$userLabel = Display::tag('label', get_lang('User'), array('class' => 'control-label')); +$personName = api_get_person_name($userInfo['firstname'], $userInfo['lastname']); +$userInput = Display::tag( + 'input', + '', + array( + 'disabled' => 'disabled', + 'type' => 'text', + 'value' => $personName + ) +); +$userControl = Display::div($userInput, array('class' => 'controls')); + +$courseLabel = Display::tag('label', get_lang('Course'), array('class' => 'control-label')); +$courseSelect = Display::select('course_id', $arrCourseList, 0, array(), false); +$courseControl = Display::div($courseSelect, array('class' => 'controls')); + +$userDiv = Display::div($userLabel . " " . $userControl, array('class' => 'control-group')); +$courseDiv = Display::div($courseLabel . " " . $courseControl, array('class' => 'control-group')); +echo $userDiv; +echo $courseDiv; + diff --git a/plugin/ticket/src/new_ticket.php b/plugin/ticket/src/new_ticket.php index f877c177c0..50f88bc725 100644 --- a/plugin/ticket/src/new_ticket.php +++ b/plugin/ticket/src/new_ticket.php @@ -21,21 +21,29 @@ api_block_anonymous_users(); require_once api_get_path(LIBRARY_PATH) . 'formvalidator/FormValidator.class.php'; require_once api_get_path(LIBRARY_PATH) . 'group_portal_manager.lib.php'; +$scrollTop = ''; +if (api_is_platform_admin()) { + $scrollTol = '$("html, body").animate({ + scrollTop: $(".divTicket").offset().top - 20 + }, "slow");'; +} + $htmlHeadXtra[] = ' @@ -128,19 +160,16 @@ div.row div.formw2 { float:left } div.divTicket { - width: 70%; - float: center; - margin-left: 15%; - + padding-top: 100px; } '; $types = TicketManager::get_all_tickets_categories(); $htmlHeadXtra[] = ''; + var projects = ' . js_array($types, 'projects', 'project_id') . ' + var course_required = ' . js_array($types, 'course_required', 'course_required') . ' + var other_area = ' . js_array($types, 'other_area', 'other_area') . ' + var email = ' . js_array($types, 'email', 'email') . ' + '; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; @@ -176,158 +205,224 @@ function show_form_send_ticket() { global $types, $plugin; echo '
'; - echo '
'; - echo ''; - - // Category - $select_types = '
-
' . get_lang('Category') . ':
-
'; - $select_types .= '"; - $select_types .= '
'; - echo $select_types; - - $select_course = '
-
'; - echo $select_course; - - // Status - $status = array(); - $status[NEWTCK] = $plugin->get_lang('StsNew'); - $showStatus = "style='display: none;'"; + //End Category List + + //Status List + $statusList = array(); + $statusAttributes = array( + 'style' => 'display: none;', + 'id' => 'status_id', + 'for' => 'status_id' + ); + $statusList[NEWTCK] = $plugin->get_lang('StatusNew'); if (api_is_platform_admin()) { - $showStatus = ""; - $status[PENDING] = $plugin->get_lang('StsPending'); - $status[UNCONFIRMED] = $plugin->get_lang('StsUnconfirmed'); - $status[CLOSE] = $plugin->get_lang('StsClose'); - $status[REENVIADO] = $plugin->get_lang('StsForwarded'); - } - $select_status = ' -
-
' . get_lang('Status') . ':
-
- -
-
'; - echo $select_status; - - // Source - $source = array(); + //End Status List + + //Source List + $sourceList = array(); + $sourceAttributes = array( + 'style' => 'display: none;', + 'id' => 'source_id', + 'for' => 'source_id' + ); + $sourceList[SRC_PLATFORM] = $plugin->get_lang('SrcPlatform'); if (api_is_platform_admin()) { - $showBlock = ""; - $source[SRC_EMAIL] = $plugin->get_lang('SrcEmail'); - $source[SRC_PHONE] = $plugin->get_lang('SrcPhone'); - $source[SRC_PRESC] = $plugin->get_lang('SrcPresential'); - } else { - $showBlock = "style='display: none;'"; - $source[SRC_PLATFORM] = $plugin->get_lang('SrcPlatform'); - } - - $select_source = ' -
-
' . $plugin->get_lang('Source') . ':
-
- -
-
'; - echo $select_source; - - // Subject - echo '
' . get_lang('Subject') . ':
-
-
'; - - // Email - echo '
' . $plugin->get_lang('PersonalEmail') . ':
-
-
'; - echo ''; - echo ''; - echo ''; - - // Message - echo '
-
' . get_lang('Message') . ':
-
- - - -
-
'; - - // Phone - echo '
' . get_lang('Phone') . ' (' . $plugin->get_lang('Optional') . '):
-
-
'; - - // Priority - $select_priority = '
-
' . $plugin->get_lang('Priority') . ':
-
'; - - $priority = array(); - $priority[NORMAL] = $plugin->get_lang('PriorityNormal'); - $priority[HIGH] = $plugin->get_lang('PriorityHigh'); - $priority[LOW] = $plugin->get_lang('PriorityLow'); - - $select_priority .= '"; - $select_priority .= '
'; - echo $select_priority; - - // Input file attach - echo '
-
' . get_lang('FilesAttachment') . ':
-
- -
- -
-
-
'; - echo '
-
- - ' . get_lang('AddOneMoreFile') . '  - (' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ') -
-
'; - echo '
-
-
-
-
-
'; - echo '
'; + //End Source List + + //Priority List + $priorityList = array(); + $priorityList[NORMAL] = $plugin->get_lang('PriorityNormal'); + $priorityList[HIGH] = $plugin->get_lang('PriorityHigh'); + $priorityList[LOW] = $plugin->get_lang('PriorityLow'); + //End Priority List + + $form = new FormValidator('send_ticket', + 'POST', + api_get_self(), + "", + array( + 'enctype' => 'multipart/form-data', + 'onsubmit' => 'return validate()', + 'class' => 'span8 offset1 form-horizontal' + ) + ); + + $form->addElement( + 'hidden', + 'user_id_request', + '', + array( + 'id' => 'user_id_request' + ) + ); + + $form->addElement( + 'hidden', + 'project_id', + '', + array( + 'id' => 'project_id' + ) + ); + + $form->addElement( + 'hidden', + 'other_area', + '', + array( + 'id' => 'other_area' + ) + ); + + $form->addElement( + 'hidden', + 'email', + '', + array( + 'id' => 'email' + ) + ); + + $form->addElement( + 'select', + 'category_id', + get_lang('Category'), + $categoryList, + array( + 'onchange' => 'changeType()', + 'id' => 'category_id', + 'for' => 'category_id', + 'style' => 'width: 562px;' + ) + ); + + $form->addElement( + 'html', + Display::div( + '', + array( + 'id' => 'user_request' + ) + ) + ); + + $form->addElement( + 'select', + 'status_id', + get_lang('Status'), + $statusList, + $statusAttributes + ); + + $form->addElement( + 'select', + 'source_id', + $plugin->get_lang('Source'), + $sourceList, + $sourceAttributes + ); + + $form->addElement( + 'text', + 'subject', + get_lang('Subject'), + array( + 'id' => 'subject', + 'style' => 'width: 550px;' + ) + ); + + $form->addElement( + 'text', + 'personal_email', + $plugin->get_lang('PersonalEmail'), + array( + 'id' => 'personal_email', + 'style' => 'width: 550px;' + ) + ); + + $form->add_html_editor( + 'content', + get_lang('Message'), + false, + false, + array( + 'ToolbarSet' => 'Profile', + 'Width' => '600', + 'Height' => '250' + ) + ); + + $form->addElement( + 'text', + 'phone', + get_lang('Phone') . ' (' . $plugin->get_lang('Optional') . ')', + array( + 'id' => 'phone' + ) + ); + + $form->addElement( + 'select', + 'priority_id', + $plugin->get_lang('Priority'), + $priorityList, + array( + 'id' => 'priority_id', + 'for' => 'priority_id' + ) + ); + + $form->addElement('html', ''); + $form->addElement('html', '
'); + $form->addElement('file', 'attach_1', get_lang('FilesAttachment')); + $form->addElement('html', '
'); + $form->addElement('html', '
'); + + $form->addElement('html', '
'); + $form->addElement('html', ''); + $form->addElement('html', '' . get_lang('AddOneMoreFile') . ''); + $form->addElement('html', ''); + $form->addElement('html', '(' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ')'); + + $form->addElement('html', '
'); + $form->addElement( + 'button', + 'compose', + get_lang('SendMessage'), + array( + 'class' => 'save', + 'id' => 'btnsubmit' + ) + ); + + $form->display(); } /** @@ -480,6 +575,8 @@ function get_user_data($from, $number_of_items, $column, $direction) if (!isset($_POST['compose'])) { if (api_is_platform_admin()) { Display::display_header(get_lang('ComposeMessage')); + $message = $plugin->get_lang('PleaseBeforeRegisterATicketSelectOneUser'); + Display::display_warning_message($message); echo '
  @@ -491,8 +588,12 @@ if (!isset($_POST['compose'])) {
'; - if (isset($_GET['keyword'])) { - $table = new SortableTable('users', 'get_number_of_users', 'get_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2); + echo '
'; + $order = (api_is_western_name_order() || api_sort_by_first_name()) ? 3 : 2; + $table = new SortableTable( + 'users', 'get_number_of_users', + 'get_user_data', $order, 10 + ); $table->set_header(0, '', false, 'width="18px"'); $table->set_header(0, get_lang('Photo'), false); $table->set_header(1, get_lang('OfficialCode')); @@ -507,7 +608,7 @@ if (!isset($_POST['compose'])) { $table->set_header(5, get_lang('Email')); $table->set_header(6, get_lang('Action')); $table->display(); - } + echo '
'; } else { $userInfo = api_get_user_info(); $htmlHeadXtra[] = " diff --git a/plugin/ticket/src/report.php b/plugin/ticket/src/report.php index 443ced6447..acfadf157d 100644 --- a/plugin/ticket/src/report.php +++ b/plugin/ticket/src/report.php @@ -251,7 +251,7 @@ echo '
 
'; if (isset($_GET['keyword'])) { - $table = new SortableTable('users', 'get_number_of_users', 'get_user_data', (api_is_western_name_order() xor api_sort_by_first_name()) ? 3 : 2); + $table = new SortableTable('users', 'get_number_of_users', 'get_user_data', (api_is_western_name_order() || api_sort_by_first_name()) ? 3 : 2); $table->set_header(0, '', false, 'width="18px"'); $table->set_header(0, get_lang('Photo'), false); $table->set_header(1, get_lang('OfficialCode')); diff --git a/plugin/ticket/src/send_ticket.php b/plugin/ticket/src/send_ticket.php index b811353c93..5679a6a9e8 100644 --- a/plugin/ticket/src/send_ticket.php +++ b/plugin/ticket/src/send_ticket.php @@ -211,7 +211,7 @@ function show_form_send_ticket()
' . get_lang('Message') . '
- +
diff --git a/plugin/ticket/src/ticket_details.php b/plugin/ticket/src/ticket_details.php index 5e6ea05ac5..a83bf6b2b7 100644 --- a/plugin/ticket/src/ticket_details.php +++ b/plugin/ticket/src/ticket_details.php @@ -26,85 +26,114 @@ if ($isAdmin) { $htmlHeadXtra[] = ' '; + $htmlHeadXtra[] = ' '; $ticket_id = $_GET['ticket_id']; @@ -167,7 +203,7 @@ if (isset($_POST['response'])) { } else if (!is_null($response) && $ticket['ticket']['status_id'] == 'XCF') { TicketManager::update_ticket_status('PND', $_GET['ticket_id'], $user_id); $ticket['ticket']['status_id'] = 'PND'; - $ticket['ticket']['status'] = $plugin->get_lang('StsPending'); + $ticket['ticket']['status'] = $plugin->get_lang('StatusPending'); } } } @@ -188,6 +224,7 @@ if (isset($_REQUEST['action'])) { break; } } + if (!isset($_POST['compose'])) { if (isset($_POST['close'])) { $_GET['ticket_id'] = $_POST['ticket_id']; @@ -279,7 +316,7 @@ if (!isset($_POST['compose'])) { } $select_admins .= ""; echo '
'; - echo '
+ echo '
' . get_lang('Responsable') . ':
@@ -289,25 +326,38 @@ if (!isset($_POST['compose'])) { echo '
'; echo '
'; $messages = $ticket['messages']; + echo "
"; + echo "
"; foreach ($messages as $message) { - $class = "messageuser"; + $type = "success"; + if ($message['admin']) { - $class = "messagesupport"; + $type = "normal"; if ($isAdmin) { $message['message'].='
' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . ""; } }else { $message['message'].='' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . ""; } - echo '
' . get_lang('Subject') . ': ' . $message['subject'] . '
' . get_lang('Message') . ':' . $message['message'] . '
'; + + $receivedMessage = '' . get_lang('Subject') . ': ' . $message['subject'] . '
' . get_lang('Message') . ':' . $message['message'] . '
'; + $attachementLinks = ""; + if (isset($message['atachments'])) { + $attributeClass = array( + 'class' => 'attachment-link' + ); foreach ($message['atachments'] as $attach) { - echo $attach['attachment_link']; + $attachementLinks .= Display::tag('div', $attach['attachment_link'], $attributeClass); } } - echo '
'; + + $entireMessage = $receivedMessage . $attachementLinks; + echo Display::return_message($entireMessage, $type, false); } - $asunto = "RE: " . $message['subject']; + echo "
"; + echo "
"; + $subject = get_lang('ReplyShort') .": " . $message['subject']; $user_admin = api_is_platform_admin(); if ($ticket['ticket']['status_id'] != 'REE' AND $ticket['ticket']['status_id'] != 'CLS') { if (!$isAdmin && $ticket['ticket']['status_id'] != 'XCF') { @@ -334,49 +384,80 @@ function show_form_send_message() { global $isAdmin; global $ticket; - global $asunto; - echo ''; - echo '
Asunto:
-
-
'; - echo '
-
- ' . get_lang('Message') . ' -
-
- - - -
-
-'; - echo ''; - echo '
-
' . get_lang('FilesAttachment') . '
-
- -
- -
-
-
'; - echo '
-
- - ' . get_lang('AddOneMoreFile') . '  - (' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ') -
-
'; - echo '
-
-
- ' . - ($isAdmin ? '      Solicitar confirmación' : "") . - '
-
'; - echo ''; + global $subject; + global $plugin; + + Display::div('', array('span2')); + + $form = new FormValidator( + 'send_ticket', + 'POST', + api_get_self() . '?ticket_id=' . $ticket['ticket']['ticket_id'], + '', + array( + 'enctype' => 'multipart/form-data', + 'onsubmit' => 'return validate()', + 'class' => 'span9 offset1 form-horizontal' + ) + ); + + $form->addElement( + 'text', + 'subject', + get_lang('Subject'), + array( + 'for' => 'subject', + 'value' => $subject, + 'style' => 'width: 540px;' + ) + ); + + $form->addElement('hidden', 'ticket_id', $_GET['ticket_id']); + + $form->add_html_editor( + 'content', + get_lang('Message'), + false, + false, + array( + 'ToolbarSet' => 'Profile', + 'Width' => '550', + 'Height' => '250' + ) + ); + + if ($isAdmin) { + $form->addElement( + 'checkbox', + 'confirmation', + null, + $plugin->get_lang('RequestConfirmation') + ); + } + + $form->addElement('html', ''); + $form->addElement('html', '
'); + $form->addElement('file', 'attach_1', get_lang('FilesAttachment')); + $form->addElement('html', '
'); + $form->addElement('html', '
'); + + $form->addElement('html', '
'); + $form->addElement('html', ''); + $form->addElement('html', '' . get_lang('AddOneMoreFile') . ''); + $form->addElement('html', ''); + $form->addElement('html', '(' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ')'); + + $form->addElement('html', '
'); + $form->addElement( + 'button', + 'compose', + get_lang('SendMessage'), + array( + 'class' => 'save' + ) + ); + + $form->display(); } Display::display_footer();