#320 Add setting
This commit is contained in:
parent
b7e54d3b45
commit
a52dbb840f
@ -864,11 +864,13 @@ if ( defined('HESK_DEMO') )
|
|||||||
</label>
|
</label>
|
||||||
<div class="col-sm-6 form-inline">
|
<div class="col-sm-6 form-inline">
|
||||||
<?php
|
<?php
|
||||||
$on = $modsForHesk_settings['rich_text_for_tickets'] ? 'checked' : '';
|
$both = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
|
||||||
$off = $modsForHesk_settings['rich_text_for_tickets'] ? '' : 'checked';
|
$staff = $modsForHesk_settings['rich_text_for_tickets'] && !$modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
|
||||||
|
$no = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? '' : 'checked';
|
||||||
echo '
|
echo '
|
||||||
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="0" '.$off.'> '.$hesklang['off'].'</label></div>
|
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="0" '.$no.'> '.$hesklang['off'].'</label></div>
|
||||||
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="1" '.$on.'> '.$hesklang['on'].'</label></div>
|
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="1" '.$staff.'> '.$hesklang['staff_only'].'</label></div>
|
||||||
|
<div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="2" '.$both.'> '.$hesklang['on'].'</label></div>
|
||||||
';
|
';
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -516,7 +516,17 @@ $set['mfh_attachments'] = empty($_POST['email_attachments']) ? 0 : 1;
|
|||||||
$set['show_number_merged'] = empty($_POST['show_number_merged']) ? 0 : 1;
|
$set['show_number_merged'] = empty($_POST['show_number_merged']) ? 0 : 1;
|
||||||
$set['request_location'] = empty($_POST['request_location']) ? 0 : 1;
|
$set['request_location'] = empty($_POST['request_location']) ? 0 : 1;
|
||||||
$set['category_order_column'] = empty($_POST['category_order_column']) ? 'cat_order' : 'name';
|
$set['category_order_column'] = empty($_POST['category_order_column']) ? 'cat_order' : 'name';
|
||||||
$set['rich_text_for_tickets'] = empty($_POST['rich_text_for_tickets']) ? 0 : 1;
|
$rich_text_setting = hesk_POST('rich_text_for_tickets', 0);
|
||||||
|
if ($rich_text_setting == 0) {
|
||||||
|
$set['rich_text_for_tickets'] = 0;
|
||||||
|
$set['rich_text_for_tickets_for_customers'] = 0;
|
||||||
|
} elseif ($rich_text_setting == 1) {
|
||||||
|
$set['rich_text_for_tickets'] = 1;
|
||||||
|
$set['rich_text_for_tickets_for_customers'] = 0;
|
||||||
|
} else {
|
||||||
|
$set['rich_text_for_tickets'] = 1;
|
||||||
|
$set['rich_text_for_tickets_for_customers'] = 1;
|
||||||
|
}
|
||||||
$set['statuses_order_column'] = empty($_POST['statuses_order_column']) ? 'sort' : 'name';
|
$set['statuses_order_column'] = empty($_POST['statuses_order_column']) ? 'sort' : 'name';
|
||||||
$set['kb_attach_dir'] = hesk_POST('kb_attach_dir', 'attachments');
|
$set['kb_attach_dir'] = hesk_POST('kb_attach_dir', 'attachments');
|
||||||
|
|
||||||
@ -596,7 +606,10 @@ $modsForHesk_settings[\'rich_text_for_tickets\'] = '.$set['rich_text_for_tickets
|
|||||||
$modsForHesk_settings[\'statuses_order_column\'] = \''.$set['statuses_order_column'].'\';
|
$modsForHesk_settings[\'statuses_order_column\'] = \''.$set['statuses_order_column'].'\';
|
||||||
|
|
||||||
//-- Directory to store knowledgebase articles in.
|
//-- Directory to store knowledgebase articles in.
|
||||||
$modsForHesk_settings[\'kb_attach_dir\'] = \''.$set['kb_attach_dir'].'\';';
|
$modsForHesk_settings[\'kb_attach_dir\'] = \''.$set['kb_attach_dir'].'\';
|
||||||
|
|
||||||
|
//-- Setting for using rich-text editor for customers. 0 = Disable, 1 = Enable
|
||||||
|
$modsForHesk_settings[\'rich_text_for_tickets_for_customers\'] = '.$set['rich_text_for_tickets_for_customers'].';';
|
||||||
|
|
||||||
// Write the file
|
// Write the file
|
||||||
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
|
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
|
||||||
|
@ -58,4 +58,7 @@ $modsForHesk_settings['rich_text_for_tickets'] = 0;
|
|||||||
$modsForHesk_settings['statuses_order_column'] = 'sort';
|
$modsForHesk_settings['statuses_order_column'] = 'sort';
|
||||||
|
|
||||||
//-- Directory to store knowledgebase articles in.
|
//-- Directory to store knowledgebase articles in.
|
||||||
$modsForHesk_settings['kb_attach_dir'] = 'attachments';
|
$modsForHesk_settings['kb_attach_dir'] = 'attachments';
|
||||||
|
|
||||||
|
//-- Setting for using rich-text editor for customers. 0 = Disable, 1 = Enable
|
||||||
|
$modsForHesk_settings['rich_text_for_tickets_for_customers'] = 0;
|
Loading…
x
Reference in New Issue
Block a user