mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Contact Edit: Fix primary setting default values (#7549)
* Contact Edit: Fix primary setting default values * Update contact_address_edit.php * Update contact_attachment_edit.php * Update contact_edit.php * Update contact_email_edit.php * Update contact_phone_edit.php * Update contact_setting_edit.php * Update contact_url_edit.php * Update contact_edit.php
This commit is contained in:
@@ -217,6 +217,9 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($address_primary === null) { $address_primary = false; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
@@ -182,6 +182,9 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($attachment_primary === null) { $attachment_primary = false; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
$contact_phones[$x]['phone_country_code'] = '';
|
||||
$contact_phones[$x]['phone_number'] = '';
|
||||
$contact_phones[$x]['phone_extension'] = '';
|
||||
$contact_phones[$x]['phone_primary'] = '';
|
||||
$contact_phones[$x]['phone_primary'] = false;
|
||||
$contact_phones[$x]['phone_description'] = '';
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@
|
||||
$contact_addresses[$x]['address_country'] = '';
|
||||
$contact_addresses[$x]['address_latitude'] = '';
|
||||
$contact_addresses[$x]['address_longitude'] = '';
|
||||
$contact_addresses[$x]['address_primary'] = '';
|
||||
$contact_addresses[$x]['address_primary'] = false;
|
||||
$contact_addresses[$x]['address_description'] = '';
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@
|
||||
$contact_emails[$x]['contact_email_uuid'] = uuid();
|
||||
$contact_emails[$x]['email_label'] = '';
|
||||
$contact_emails[$x]['email_address'] = '';
|
||||
$contact_emails[$x]['email_primary'] = '';
|
||||
$contact_emails[$x]['email_primary'] = false;
|
||||
$contact_emails[$x]['email_description'] = '';
|
||||
}
|
||||
|
||||
@@ -836,7 +836,7 @@
|
||||
$contact_urls[$x]['url_type'] = '';
|
||||
$contact_urls[$x]['url_label'] = '';
|
||||
$contact_urls[$x]['url_address'] = '';
|
||||
$contact_urls[$x]['url_primary'] = '';
|
||||
$contact_urls[$x]['url_primary'] = false;
|
||||
$contact_urls[$x]['url_description'] = '';
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +180,9 @@ if (!empty($_GET["contact_uuid"]) && is_uuid($_GET["contact_uuid"])) {
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($email_primary === null) { $email_primary = false; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
$phone_country_code = '';
|
||||
$phone_number = '';
|
||||
$phone_extension = '';
|
||||
$phone_primary = '';
|
||||
$phone_description = '';
|
||||
|
||||
//action add or update
|
||||
@@ -243,6 +242,9 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($phone_primary === null) { $phone_primary = false; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
@@ -395,8 +397,8 @@
|
||||
echo " <span class='switch'>\n";
|
||||
}
|
||||
echo " <select class='formfld' id='phone_primary' name='phone_primary'>\n";
|
||||
echo " <option value='false' ".($phone_primary === false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".($phone_primary === true ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($phone_primary === false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
if ($input_toggle_style_switch) {
|
||||
echo " <span class='slider'></span>\n";
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
$contact_setting_name = '';
|
||||
$contact_setting_value = '';
|
||||
$contact_setting_order = '';
|
||||
$contact_setting_enabled = '';
|
||||
$contact_setting_description = '';
|
||||
|
||||
//action add or update
|
||||
@@ -75,7 +74,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"]) ?? false;
|
||||
$contact_setting_enabled = strtolower($_POST["contact_setting_enabled"]);
|
||||
$contact_setting_description = $_POST["contact_setting_description"];
|
||||
}
|
||||
|
||||
@@ -195,6 +194,9 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($contact_setting_enabled === null) { $contact_setting_enabled = true; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
@@ -309,8 +311,8 @@
|
||||
echo " <span class='switch'>\n";
|
||||
}
|
||||
echo " <select class='formfld' id='contact_setting_enabled' name='contact_setting_enabled'>\n";
|
||||
echo " <option value='false' ".($contact_setting_enabled === false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " <option value='true' ".($contact_setting_enabled === true ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
||||
echo " <option value='false' ".($contact_setting_enabled === false ? "selected='selected'" : null).">".$text['option-false']."</option>\n";
|
||||
echo " </select>\n";
|
||||
if ($input_toggle_style_switch) {
|
||||
echo " <span class='slider'></span>\n";
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
$url_label = '';
|
||||
$url_label_custom = '';
|
||||
$url_address = '';
|
||||
$url_primary = '';
|
||||
$url_description = '';
|
||||
|
||||
//action add or update
|
||||
@@ -183,6 +182,9 @@
|
||||
unset($sql, $parameters, $row);
|
||||
}
|
||||
|
||||
//set the defaults
|
||||
if ($url_primary === null) { $url_primary = false; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
Reference in New Issue
Block a user