diff --git a/include/class.forms.php b/include/class.forms.php index 10322eae1a52f5eb4e2b2aad59f85387ed93af40..5253fa55affb06552035de3e40e3fd56b45ad816 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1200,7 +1200,7 @@ class ThreadEntryWidget extends Widget { ?><div style="margin-bottom:0.5em;margin-top:0.5em"><strong><?php echo Format::htmlchars($this->field->get('label')); ?></strong>:</div> - <textarea name="<?php echo $this->field->get('name'); ?>" + <textarea style="width:100%;" name="<?php echo $this->field->get('name'); ?>" placeholder="<?php echo Format::htmlchars($this->field->get('hint')); ?>" <?php if (!$client) { ?> data-draft-namespace="ticket.staff" @@ -1210,7 +1210,7 @@ class ThreadEntryWidget extends Widget { <?php } ?> class="richtext draft draft-delete ifhtml" cols="21" rows="8" style="width:80%;"><?php echo - $this->value; ?></textarea> + Format::htmlchars($this->value); ?></textarea> <?php } @@ -1221,6 +1221,7 @@ class ThreadEntryWidget extends Widget { && !$cfg->allowAttachmentsOnlogin()) || ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))) { ?> + <div class="clear"><div> <hr/> <div><strong style="padding-right:1em;vertical-align:top">Attachments: </strong> <div style="display:inline-block"> diff --git a/open.php b/open.php index 4cb7684a8167b7cd5a3c07f67d876b83c313cb4d..474ad175e292bb3252e64d32c036ba7d391fb8b6 100644 --- a/open.php +++ b/open.php @@ -42,10 +42,12 @@ if($_POST): if (!$errors && $cfg->allowOnlineAttachments() && $_FILES['attachments']) $vars['files'] = AttachmentFile::format($_FILES['attachments'], true); + // Drop the draft.. If there are validation errors, the content + // submitted will be displayed back to the user + Draft::deleteForNamespace('ticket.client.'.substr(session_id(), -12)); //Ticket::create...checks for errors.. if(($ticket=Ticket::create($vars, $errors, SOURCE))){ $msg='Support ticket request created'; - Draft::deleteForNamespace('ticket.client.'.substr(session_id(), -12)); // Save the form data from the help-topic form, if any if ($form) { $form->setTicketId($ticket->getId());