#91 Support multilanguage custom fields

merge-requests/2/head
Mike Koch 9 years ago
parent aa4f8bb736
commit dde55cf4e1

@ -1036,6 +1036,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
@ -1062,6 +1067,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{

@ -246,6 +246,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$k_value = $ticket[$k];
if ($v['type'] == 'checkbox')

@ -481,6 +481,11 @@ if (isset($_GET['w']))
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$tmp .= '<Cell><Data ss:Type="String">'.$v['name'].'</Data></Cell>' . "\n";
}
}

@ -285,6 +285,11 @@ myField.value += myValue;
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '| <a href="javascript:void(0)" onclick="hesk_insertTag(\'HESK_'.$k.'\')">'.$v['name'].'</a> ';
}
}

@ -184,6 +184,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
// Staff doesn't need to fill in required custom fields
$v['req'] = '';
@ -398,6 +403,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
// $v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
// Staff doesn't need to fill in required custom fields
$v['req'] = '';

@ -349,6 +349,11 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
$selected = ($what == $k) ? 'selected="selected"' : '';
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'],0,30) . '...' : $v['name'];
echo '<option value="'.$k.'" '.$selected.'>'.$v['name'].'</option>';
}

@ -66,7 +66,7 @@ exit();
function print_add_ticket()
{
global $hesk_settings, $hesklang;
global $hesk_settings, $hesklang, $modsForHesk_settings;
// Auto-focus first empty or error field
define('AUTOFOCUS', true);
@ -222,8 +222,14 @@ function print_add_ticket()
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
if ($v['type'] == 'checkbox')
@ -447,12 +453,18 @@ function print_add_ticket()
<!-- START CUSTOM AFTER -->
<?php
/* custom fields BEFORE comments */
/* custom fields AFTER comments */
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
if ($v['type'] == 'checkbox')

@ -206,8 +206,13 @@ $num_cols = 0;
echo '<tr>';
foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
if ($num_cols == 3)
{
echo '</tr><tr>';

@ -207,6 +207,11 @@ foreach ($hesk_settings['custom_fields'] as $k=>$v)
{
if ($v['use'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
if ($v['type'] == 'checkbox')
{
$tmpvar[$k]='';

@ -330,6 +330,11 @@ require_once(HESK_PATH . 'inc/header.inc.php');
{
if ($v['use'] && $v['place']==0)
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{
@ -356,6 +361,11 @@ require_once(HESK_PATH . 'inc/header.inc.php');
{
if ($v['use'] && $v['place'])
{
if ($modsForHesk_settings['custom_field_setting'])
{
$v['name'] = $hesklang[$v['name']];
}
echo '<p>'.$v['name'].': ';
if ($v['type'] == 'date' && !empty($ticket[$k]))
{

Loading…
Cancel
Save