";
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 5a1823c03c0..b1437575617 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -1576,7 +1576,7 @@ class FormTicket
// Attached files
if (!empty($this->withfile)) {
$out = '
';
- $out .= '
'.$langs->trans("MailFile").'
';
+ $out .= '
'.$langs->trans("MailFile").'
';
$out .= '
';
// TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
$out .= ''."\n";
@@ -1662,7 +1662,7 @@ class FormTicket
//$toolbarname = 'dolibarr_details';
$toolbarname = 'dolibarr_notes';
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
- $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_SOCIETE'), ROWS_5, 70);
+ $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, $uselocalbrowser, getDolGlobalInt('FCKEDITOR_ENABLE_TICKET'), ROWS_5, '90%');
$doleditor->Create();
print '
';
print 'withfile == 2 && !empty($conf->use_javascript_ajax)) {
@@ -1697,7 +1697,7 @@ class FormTicket
print ''."\n";
- print "\n";
+ print " \n";
// Disable enter key if option MAIN_MAILFORM_DISABLE_ENTERKEY is set
if (!empty($conf->global->MAIN_MAILFORM_DISABLE_ENTERKEY)) {
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 055265c25b3..4bd0e5640df 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2424,3 +2424,4 @@ ReEncryptDesc=Reencrypt data if not yet encrypted
PasswordFieldEncrypted=%s new record have this field been encrypted
ExtrafieldsDeleted=Extrafields %s has been deleted
LargeModern=Large - Modern
+SpecialCharActivation=Enable the button to open a virtual keyboard to enter special characters
\ No newline at end of file
diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php
index ecacb5b78f5..44f71ac251b 100644
--- a/htdocs/public/ticket/view.php
+++ b/htdocs/public/ticket/view.php
@@ -182,10 +182,8 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
}
if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) {
- // TODO Add message...
$ret = $object->dao->newMessage($user, $action, 0, 1);
-
if (!$error) {
$action = 'view_ticket';
}
@@ -334,7 +332,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
$fuser = new User($db);
$fuser->fetch($object->dao->fk_user_assign);
print img_picto('', 'user', 'class="pictofixedwidth"');
- print $fuser->getFullName($langs, 1);
+ print $fuser->getFullName($langs, 0);
}
print '';
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 433c653614d..6ce9847ca00 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -1708,16 +1708,16 @@ class Ticket extends CommonObject
/**
* Add message into database
*
- * @param User $user User that creates
- * @param int $notrigger 0=launch triggers after, 1=disable triggers
- * @param array $filename_list List of files to attach (full path of filename on file system)
- * @param array $mimetype_list List of MIME type of attached files
- * @param array $mimefilename_list List of attached file name in message
- * @param boolean $send_email Whether the message is sent by email
- * @param boolean $public_area 1=Is the public area
- * @return int <0 if KO, >0 if OK
+ * @param User $user User that creates
+ * @param int $notrigger 0=launch triggers after, 1=disable triggers
+ * @param array $filename_list List of files to attach (full path of filename on file system)
+ * @param array $mimetype_list List of MIME type of attached files
+ * @param array $mimefilename_list List of attached file name in message
+ * @param boolean $send_email Whether the message is sent by email
+ * @param int $public_area 0=Default, 1 if we are creating the message from a public area (so we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set)
+ * @return int <0 if KO, >0 if OK
*/
- public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $send_email = false, $public_area = false)
+ public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $send_email = false, $public_area = 0)
{
global $conf, $langs;
$error = 0;
@@ -2528,8 +2528,10 @@ class Ticket extends CommonObject
*
* @param User $user User for action
* @param string $action Action string
- * @param int $private 1=Message is private. TODO Implement this. What does this means ?
- * @param int $public_area 1=Is the public area
+ * @param int $private 1=Message is private (must not be visible by external users)
+ * @param int $public_area 0=Default,
+ * 1=If we are creating the message from a public area, so confirmation email will be sent to the author
+ * and we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set
* @return int <0 if KO, >= 0 if OK
*/
public function newMessage($user, &$action, $private = 1, $public_area = 0)
@@ -2856,12 +2858,13 @@ class Ticket extends CommonObject
}
}
- // Set status to "answered" if not set yet, but only if internal user and not private message
- // Or set status to "answered" if the client has answered and if the ticket has started
+ // Set status back to "In progress" if not set yet, but only if internal user and not a private message
+ // Or set status to "In porgress" if the client has answered and if the ticket has started
+ // So we are sure to leave the STATUS_DRAFT, STATUS_NEED_INFO.
if (($object->status < self::STATUS_IN_PROGRESS && !$user->socid && !$private) ||
($object->status > self::STATUS_IN_PROGRESS && $public_area)
) {
- $object->setStatut(3);
+ $object->setStatut($object::STATUS_IN_PROGRESS);
}
return 1;
} else {