From 79c41a28b18f1c667c8ebd4cbc2a97bacde6502f Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 10 Jan 2014 15:41:28 -0600 Subject: [PATCH] Show extra forms for help topic first Extra forms associated with the help topic are now shown above the ticket details form on both the staff and client interfaces. --- include/client/open.inc.php | 13 ++++++++----- include/staff/ticket-open.inc.php | 16 ++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/include/client/open.inc.php b/include/client/open.inc.php index d47e07380..75211c098 100644 --- a/include/client/open.inc.php +++ b/include/client/open.inc.php @@ -48,16 +48,18 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):$info; <tr><td colspan="2"><hr /></td></tr> <tr><td>Email:</td><td><?php echo $thisclient->getEmail(); ?></td></tr> <tr><td>Client:</td><td><?php echo $thisclient->getName(); ?></td></tr> - <?php } - $tform = TicketForm::getInstance()->getForm($_POST); - if ($_POST) $tform->isValid(); - $tform->render(false); ?> + <?php } ?> </tbody> <tbody id="dynamic-form"> <?php if ($form) { include(CLIENTINC_DIR . 'templates/dynamic-form.tmpl.php'); } ?> </tbody> + <tbody><?php + $tform = TicketForm::getInstance()->getForm($_POST); + if ($_POST) $tform->isValid(); + $tform->render(false); ?> + </tbody> <tbody> <?php if($cfg && $cfg->isCaptchaEnabled() && (!$thisclient || !$thisclient->isValid())) { @@ -79,7 +81,8 @@ $info=($_POST && $errors)?Format::htmlchars($_POST):$info; <tr><td colspan=2> </td></tr> </tbody> </table> - <p style="padding-left:150px;"> +<hr/> + <p style="text-align:center;"> <input type="submit" value="Create Ticket"> <input type="reset" value="Reset"> <input type="button" value="Cancel" onClick='window.location.href="index.php"'> diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index 489d45ed4..18c052a82 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -221,23 +221,23 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); </select> <span class='error'> <?php echo $errors['assignId']; ?></span> </td> </tr> - <?php - } - $tform = TicketForm::getInstance()->getForm($_POST); - if ($_POST) $tform->isValid(); - $tform->render(true); - ?> + <?php } ?> </tbody> <tbody id="dynamic-form"> <?php if ($form) $form->getForm()->render(true); ?> </tbody> + <tbody> <?php + $tform = TicketForm::getInstance()->getForm($_POST); + if ($_POST) $tform->isValid(); + $tform->render(true); + ?> + </tbody> <tbody> <?php //is the user allowed to post replies?? - if($thisstaff->canPostReply()) { - ?> + if($thisstaff->canPostReply()) { ?> <tr> <th colspan="2"> <em><strong>Response</strong>: Optional response to the above issue.</em> -- GitLab