From c184cc3c1bd8ef337e084b58fa1a1e8eafaf8474 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 23 Jan 2015 00:14:23 -0500 Subject: [PATCH] #105 Allow staff to indicate language when creating ticket and when editing --- admin/admin_submit_ticket.php | 3 +++ admin/admin_ticket.php | 4 ++++ admin/edit_post.php | 16 ++++++++++++++-- admin/new_ticket.php | 10 ++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/admin/admin_submit_ticket.php b/admin/admin_submit_ticket.php index 9adf7319..db4da2cd 100644 --- a/admin/admin_submit_ticket.php +++ b/admin/admin_submit_ticket.php @@ -62,6 +62,9 @@ if ( empty($_POST) && ! empty($_SERVER['CONTENT_LENGTH']) ) $hesk_error_buffer = array(); +if ($hesk_settings['can_sel_lang']) { + $tmpvar['language'] = hesk_POST('customerLanguage'); +} $tmpvar['name'] = hesk_input( hesk_POST('name') ) or $hesk_error_buffer['name']=$hesklang['enter_your_name']; $tmpvar['email'] = hesk_POST('email'); $tmpvar['category'] = intval( hesk_POST('category') ) or $hesk_error_buffer['category']=$hesklang['sel_app_cat']; diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index 27e4736c..c5c0d9f5 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -658,6 +658,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); echo $trackingID.'
'.$tmp;?> +
  • +
    + +

  • diff --git a/admin/edit_post.php b/admin/edit_post.php index 92b25bc1..beda6625 100644 --- a/admin/edit_post.php +++ b/admin/edit_post.php @@ -115,6 +115,7 @@ if (isset($_POST['save'])) } else { + $tmpvar['language'] = hesk_POST('customerLanguage'); $tmpvar['name'] = hesk_input( hesk_POST('name') ) or $hesk_error_buffer[]=$hesklang['enter_your_name']; $tmpvar['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0); $tmpvar['subject'] = hesk_input( hesk_POST('subject') ) or $hesk_error_buffer[]=$hesklang['enter_ticket_subject']; @@ -191,7 +192,8 @@ if (isset($_POST['save'])) `custom17`='".hesk_dbEscape($tmpvar['custom17'])."', `custom18`='".hesk_dbEscape($tmpvar['custom18'])."', `custom19`='".hesk_dbEscape($tmpvar['custom19'])."', - `custom20`='".hesk_dbEscape($tmpvar['custom20'])."' + `custom20`='".hesk_dbEscape($tmpvar['custom20'])."', + `language`='".hesk_dbEscape($tmpvar['language'])."' WHERE `id`='".intval($ticket['id'])."' LIMIT 1"); } @@ -225,7 +227,17 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); /* If it's not a reply edit all the fields */ if (!$is_reply) { - ?> + if ($hesk_settings['can_sel_lang']) { + ?> +
    + +
    + +
    +
    +
    diff --git a/admin/new_ticket.php b/admin/new_ticket.php index 32322adf..a4b91f5e 100644 --- a/admin/new_ticket.php +++ b/admin/new_ticket.php @@ -163,6 +163,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
    + +
    + +
    + +
    +
    + ';} else {echo '
    ';} ?>