';
if ($isDisabled)
@@ -2228,6 +2243,14 @@ if ( defined('HESK_DEMO') )
echo '
'; // Short Name Language File
echo '
'; // Long Name Language File
echo '
'; // Text Color
+ echo '
+
+
';
echo '
'; // Resolved Status?
echo '
'; //Empty placeholder where the delete row is.
echo '
';
diff --git a/admin/admin_settings_save.php b/admin/admin_settings_save.php
index 96615491..89e450ea 100644
--- a/admin/admin_settings_save.php
+++ b/admin/admin_settings_save.php
@@ -529,10 +529,10 @@ while ($row = $results->fetch_assoc())
} else
{
//-- Update the information in the database with what is on the page
- $query = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `ShortNameContentKey` = ?, `TicketViewContentKey` = ?, `TextColor` = ?, `IsClosed` = ? WHERE `ID` = ?";
+ $query = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `ShortNameContentKey` = ?, `TicketViewContentKey` = ?, `TextColor` = ?, `IsClosed` = ?, `Closable` = ? WHERE `ID` = ?";
$stmt = hesk_dbConnect()->prepare($query);
$isStatusClosed = (isset($_POST['s'.$row['ID'].'_isClosed']) ? 1 : 0);
- $stmt->bind_param('sssii', $_POST['s'.$row['ID'].'_shortName'], $_POST['s'.$row['ID'].'_longName'], $_POST['s'.$row['ID'].'_textColor'], $isStatusClosed, $row['ID']);
+ $stmt->bind_param('sssisi', $_POST['s'.$row['ID'].'_shortName'], $_POST['s'.$row['ID'].'_longName'], $_POST['s'.$row['ID'].'_textColor'], $isStatusClosed, $_POST['s'.$row['ID'].'_closable'], $row['ID']);
$stmt->execute();
}
}
@@ -555,7 +555,7 @@ if ($_POST['sN_shortName'] != null && $_POST['sN_longName'] != null && $_POST['s
$insert = "INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` (`ID`, `ShortNameContentKey`, `TicketViewContentKey`, `TextColor`, `IsClosed`) VALUES (?, ?, ?, ?, ?)";
$stmt = hesk_dbConnect()->prepare($insert);
$isClosed = isset($_POST['sN_isClosed']) ? 1 : 0;
- $stmt->bind_param('isssi', $nextValue, $_POST['sN_shortName'], $_POST['sN_longName'], $_POST['sN_textColor'], $isClosed);
+ $stmt->bind_param('isssis', $nextValue, $_POST['sN_shortName'], $_POST['sN_longName'], $_POST['sN_textColor'], $isClosed, $_POST['sN_closable']);
$stmt->execute();
}
diff --git a/install/mods-for-hesk/sql/installSql.php b/install/mods-for-hesk/sql/installSql.php
index 84fddf67..19415b83 100644
--- a/install/mods-for-hesk/sql/installSql.php
+++ b/install/mods-for-hesk/sql/installSql.php
@@ -381,7 +381,7 @@ function execute211Scripts() {
}
function execute211FileUpdate() {
- //-- Add the boostrap theme property to modsForHesk_settings.inc.php
+ //-- Add the new kb article visibility property to modsForHesk_settings.inc.php
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
//-- Only add the additional settings if they aren't already there.
@@ -402,5 +402,8 @@ function execute220Scripts() {
global $hesk_settings;
hesk_dbConnect();
+ executeQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` ADD COLUMN `Closable` VARCHAR(10) NOT NULL");
+ executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."statuses` SET `Closable` = 'yes'");
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.2.0' WHERE `Key` = 'modsForHeskVersion'");
-}
\ No newline at end of file
+}
+// END Version 2.2.0
\ No newline at end of file
diff --git a/language/en/text.php b/language/en/text.php
index c08f7f67..d18be663 100644
--- a/language/en/text.php
+++ b/language/en/text.php
@@ -47,7 +47,17 @@ $hesklang['email_template_saved'] = 'The email template %s has been saved
$hesklang['error_saving_template'] = 'An error occurred when trying to save the email template!';
$hesklang['can_man_email_tpl'] = 'Edit email templates';
$hesklang['email_template_directory_not_writable'] = 'The email template %s is not writable by HESK. Please CHMOD it to 0666.'; // %s: template file name
-
+$hesklang['closable_question'] = 'Closable?';
+$hesklang['closable_description'] = 'This setting is ignored if the "Closed?" checkbox is checked for this status.
+
Determines if the customer staff is able to close a ticket in this status.
+
Yes: Both customers and staff can close a ticket in this status.
+ Customers only: Customers can close a ticket in this status, but staff cannot.
+ Staff only: Staff can close a ticket in this status, but customers cannot.
+ No: No one is allowed to close a ticket in this status.'; // " = "
+$hesklang['customers_only'] = 'Customers only';
+$hesklang['staff_only'] = 'Staff only';
+$hesklang['yes_title_case'] = 'Yes';
+$hesklang['no_title_case'] = 'No';
// ADDED OR MODIFIED IN Mods for HESK 2.1.1
$hesklang['new_article_default_type'] = 'Default Type for New Articles';