Remove Phone Masking option in favor of Country Codes
This commit is contained in:
@@ -218,28 +218,6 @@ require_once "includes/inc_all_admin.php";
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Phone Mask</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-phone"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="phone_mask">
|
|
||||||
<?php
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT config_phone_mask FROM settings WHERE company_id = 1");
|
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
|
||||||
$phone_mask = intval($row['config_phone_mask']);
|
|
||||||
} ?>
|
|
||||||
<option <?php if ($phone_mask == 1) { echo "selected"; }?> value=1>
|
|
||||||
US Format - e.g. (412) 888-9999
|
|
||||||
</option>
|
|
||||||
<option <?php if ($phone_mask == 0) { echo "selected"; }?> value=0>
|
|
||||||
Non-US Format - e.g. 4128889999
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<button type="submit" name="edit_default_settings" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
<button type="submit" name="edit_default_settings" class="btn btn-primary text-bold"><i class="fa fa-check mr-2"></i>Save</button>
|
||||||
|
|||||||
@@ -3419,10 +3419,15 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
|
|||||||
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.1'");
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.1'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (CURRENT_DATABASE_VERSION == '2.1.1') {
|
if (CURRENT_DATABASE_VERSION == '2.1.1') {
|
||||||
// // Insert queries here required to update to DB version 2.1.2
|
mysqli_query($mysqli, "ALTER TABLE `settings` DROP `config_phone_mask`");
|
||||||
|
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.2'");
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (CURRENT_DATABASE_VERSION == '2.1.2') {
|
||||||
|
// // Insert queries here required to update to DB version 2.1.3
|
||||||
// // Then, update the database to the next sequential version
|
// // Then, update the database to the next sequential version
|
||||||
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.2'");
|
// mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.1.3'");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
2
db.sql
2
db.sql
@@ -2499,4 +2499,4 @@ CREATE TABLE `vendors` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2025-03-24 12:48:58
|
-- Dump completed on 2025-03-26 11:10:26
|
||||||
|
|||||||
@@ -16,9 +16,8 @@ if (isset($_POST['edit_default_settings'])) {
|
|||||||
$calendar = intval($_POST['calendar']);
|
$calendar = intval($_POST['calendar']);
|
||||||
$net_terms = intval($_POST['net_terms']);
|
$net_terms = intval($_POST['net_terms']);
|
||||||
$hourly_rate = floatval($_POST['hourly_rate']);
|
$hourly_rate = floatval($_POST['hourly_rate']);
|
||||||
$phone_mask = intval($_POST['phone_mask']);
|
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE settings SET config_start_page = '$start_page', config_default_expense_account = $expense_account, config_default_payment_account = $payment_account, config_default_payment_method = '$payment_method', config_default_expense_payment_method = '$expense_payment_method', config_default_transfer_from_account = $transfer_from_account, config_default_transfer_to_account = $transfer_to_account, config_default_calendar = $calendar, config_default_net_terms = $net_terms, config_default_hourly_rate = $hourly_rate, config_phone_mask = $phone_mask WHERE company_id = 1");
|
mysqli_query($mysqli,"UPDATE settings SET config_start_page = '$start_page', config_default_expense_account = $expense_account, config_default_payment_account = $payment_account, config_default_payment_method = '$payment_method', config_default_expense_payment_method = '$expense_payment_method', config_default_transfer_from_account = $transfer_from_account, config_default_transfer_to_account = $transfer_to_account, config_default_calendar = $calendar, config_default_net_terms = $net_terms, config_default_hourly_rate = $hourly_rate WHERE company_id = 1");
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
logAction("Settings", "Edit", "$session_name edited default settings");
|
logAction("Settings", "Edit", "$session_name edited default settings");
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ mysqli_query($mysqli,"INSERT INTO custom_links SET custom_link_name = 'Docs', cu
|
|||||||
|
|
||||||
// Finalizing
|
// Finalizing
|
||||||
mysqli_query($mysqli,"UPDATE companies SET company_locale = '$locale', company_currency = '$currency_code' WHERE company_id = 1");
|
mysqli_query($mysqli,"UPDATE companies SET company_locale = '$locale', company_currency = '$currency_code' WHERE company_id = 1");
|
||||||
mysqli_query($mysqli,"UPDATE settings SET config_timezone = '$timezone', config_phone_mask = 1 WHERE company_id = 1");
|
mysqli_query($mysqli,"UPDATE settings SET config_timezone = '$timezone' WHERE company_id = 1");
|
||||||
mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_currency_code = '$currency_code'");
|
mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_currency_code = '$currency_code'");
|
||||||
|
|
||||||
// Telemetry (optional if interactive)
|
// Telemetry (optional if interactive)
|
||||||
|
|||||||
18
setup.php
18
setup.php
@@ -344,11 +344,10 @@ if (isset($_POST['add_localization_settings'])) {
|
|||||||
$locale = sanitizeInput($_POST['locale']);
|
$locale = sanitizeInput($_POST['locale']);
|
||||||
$currency_code = sanitizeInput($_POST['currency_code']);
|
$currency_code = sanitizeInput($_POST['currency_code']);
|
||||||
$timezone = sanitizeInput($_POST['timezone']);
|
$timezone = sanitizeInput($_POST['timezone']);
|
||||||
$phone_mask = intval($_POST['phone_mask']);
|
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE companies SET company_locale = '$locale', company_currency = '$currency_code' WHERE company_id = 1");
|
mysqli_query($mysqli,"UPDATE companies SET company_locale = '$locale', company_currency = '$currency_code' WHERE company_id = 1");
|
||||||
|
|
||||||
mysqli_query($mysqli,"UPDATE settings SET config_timezone = '$timezone', config_phone_mask = $phone_mask WHERE company_id = 1");
|
mysqli_query($mysqli,"UPDATE settings SET config_timezone = '$timezone' WHERE company_id = 1");
|
||||||
|
|
||||||
// Create Default Cash Account
|
// Create Default Cash Account
|
||||||
mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_currency_code = '$currency_code'");
|
mysqli_query($mysqli,"INSERT INTO accounts SET account_name = 'Cash', account_currency_code = '$currency_code'");
|
||||||
@@ -1058,7 +1057,7 @@ if (isset($_POST['add_telemetry'])) {
|
|||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" class="form-control" name="phone" placeholder="Phone Number">
|
<input type="tel" class="form-control" name="phone" placeholder="Phone Number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1146,19 +1145,6 @@ if (isset($_POST['add_telemetry'])) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Phone Mask</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-phone"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="phone_mask">
|
|
||||||
<option value="1">US Format - e.g. (412) 888-9999</option>
|
|
||||||
<option value="0">Non-US Format - e.g. 4128889999</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<button type="submit" name="add_localization_settings" class="btn btn-primary text-bold">
|
<button type="submit" name="add_localization_settings" class="btn btn-primary text-bold">
|
||||||
|
|||||||
Reference in New Issue
Block a user