diff --git a/core/contacts/contact_edit.php b/core/contacts/contact_edit.php
index ffd990e006..aaae9efb78 100644
--- a/core/contacts/contact_edit.php
+++ b/core/contacts/contact_edit.php
@@ -512,7 +512,7 @@
$array['contacts'][0]['contact_settings'][$y]['contact_setting_name'] = $row["contact_setting_name"];
$array['contacts'][0]['contact_settings'][$y]['contact_setting_value'] = $row["contact_setting_value"];
$array['contacts'][0]['contact_settings'][$y]['contact_setting_order'] = $row["contact_setting_order"];
- $array['contacts'][0]['contact_settings'][$y]['contact_setting_enabled'] = $row["contact_setting_enabled"];
+ $array['contacts'][0]['contact_settings'][$y]['contact_setting_enabled'] = $row["contact_setting_enabled"] ?? 'false';
$array['contacts'][0]['contact_settings'][$y]['contact_setting_description'] = $row["contact_setting_description"];
$y++;
}
@@ -897,7 +897,7 @@
$contact_settings[$x]['contact_setting_name'] = '';
$contact_settings[$x]['contact_setting_value'] = '';
$contact_settings[$x]['contact_setting_order'] = '';
- $contact_settings[$x]['contact_setting_enabled'] = '';
+ $contact_settings[$x]['contact_setting_enabled'] = 'true';
$contact_settings[$x]['contact_setting_description'] = '';
}
@@ -2501,19 +2501,8 @@ if (permission_exists('contact_setting_view')) {
echo "
\n";
echo " \n";
echo "
\n";
@@ -2522,23 +2511,19 @@ if (permission_exists('contact_setting_view')) {
echo " ".$text['label-enabled']."\n";
echo " \n";
echo " \n";
- echo " \n";
echo "
\n";
-
echo " \n";
echo " ".$text['label-description']."\n";
echo "
\n";
@@ -2546,22 +2531,11 @@ if (permission_exists('contact_setting_view')) {
echo " \n";
echo " \n";
- if (!empty($contact_settings) && @sizeof($contact_settings) > 1 && permission_exists('contact_setting_delete')) {
- if (!empty($row['contact_setting_uuid']) && is_uuid($row['contact_setting_uuid'])) {
- echo " \n";
- echo " ".$text['label-enabled']."\n";
- echo "
\n";
- echo " \n";
- echo " \n";
- echo "
\n";
- }
- }
-
- echo " \n";
- echo " \n";
- echo "
\n";
- echo " \n";
- echo "
\n";
+ // echo " \n";
+ // echo " \n";
+ // echo "
\n";
+ // echo " \n";
+ // echo "
\n";
echo " \n";
$x++;
diff --git a/core/contacts/contact_setting_edit.php b/core/contacts/contact_setting_edit.php
index 0f0939a54f..eae4fcecea 100644
--- a/core/contacts/contact_setting_edit.php
+++ b/core/contacts/contact_setting_edit.php
@@ -75,7 +75,7 @@
$contact_setting_name = strtolower($_POST["contact_setting_name"]);
$contact_setting_value = $_POST["contact_setting_value"];
$contact_setting_order = $_POST["contact_setting_order"] ?? null;
- $contact_setting_enabled = strtolower($_POST["contact_setting_enabled"]);
+ $contact_setting_enabled = strtolower($_POST["contact_setting_enabled"]) ?? 'false';
$contact_setting_description = $_POST["contact_setting_description"];
}
@@ -296,19 +296,9 @@
echo "\n";
echo "\n";
echo " \n";
- $i=0;
- while($i<=999) {
- $selected = ($i == $contact_setting_order) ? "selected" : null;
- if (strlen($i) == 1) {
- echo " \n";
- }
- if (strlen($i) == 2) {
- echo " \n";
- }
- if (strlen($i) == 3) {
- echo " \n";
- }
- $i++;
+ echo " \n";
+ for ($i = 0; $i <=999; $i++) {
+ echo " \n";
}
echo " \n";
echo " \n";
@@ -322,20 +312,18 @@
echo " ".$text['label-enabled']."\n";
echo " | \n";
echo "\n";
- echo " \n";
- if ($contact_setting_enabled == "true") {
- echo " \n";
+ if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
+ echo " \n";
}
else {
- echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
}
- if ($contact_setting_enabled == "false") {
- echo " \n";
- }
- else {
- echo " \n";
- }
- echo " \n";
echo " \n";
echo $text['description-enabled']."\n";
echo " | \n";