mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Customizable empty rows for device keys (#6561)
* Customizable empty rows for device keys * New default setting profile_add_rows and profile_edit_rows
This commit is contained in:
@@ -350,6 +350,22 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3d847335-be0a-4130-9c38-0f1d906f3eea";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "devices";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "profile_add_rows";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "10";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "53ccbe30-0a40-46af-a31e-12899d6c8e05";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "devices";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "profile_edit_rows";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||
|
||||
//schema details
|
||||
$y=0;
|
||||
|
||||
@@ -308,20 +308,30 @@
|
||||
}
|
||||
|
||||
//add an empty row
|
||||
$x = is_array($device_profile_keys) ? count($device_profile_keys) : 0;
|
||||
$device_profile_keys[$x]['domain_uuid'] = $domain_uuid;
|
||||
$device_profile_keys[$x]['device_profile_uuid'] = $device_profile_uuid;
|
||||
$device_profile_keys[$x]['device_profile_key_uuid'] = '';
|
||||
$device_profile_keys[$x]['profile_key_category'] = '';
|
||||
$device_profile_keys[$x]['profile_key_id'] = '';
|
||||
$device_profile_keys[$x]['profile_key_vendor'] = '';
|
||||
$device_profile_keys[$x]['profile_key_type'] = '';
|
||||
$device_profile_keys[$x]['profile_key_line'] = '';
|
||||
$device_profile_keys[$x]['profile_key_value'] = '';
|
||||
$device_profile_keys[$x]['profile_key_extension'] = '';
|
||||
$device_profile_keys[$x]['profile_key_protected'] = '';
|
||||
$device_profile_keys[$x]['profile_key_label'] = '';
|
||||
$device_profile_keys[$x]['profile_key_icon'] = '';
|
||||
if (!is_array($device_profile_keys) || count($device_profile_keys) == 0) {
|
||||
$rows = $_SESSION['devices']['profile_add_rows']['numeric'];
|
||||
$id = 0;
|
||||
}
|
||||
if (is_array($device_profile_keys) && count($device_profile_keys) > 0) {
|
||||
$rows = $_SESSION['devices']['profile_edit_rows']['numeric'];
|
||||
$id = count($device_profile_keys)+1;
|
||||
}
|
||||
for ($x = 0; $x < $rows; $x++) {
|
||||
$device_profile_keys[$id]['domain_uuid'] = $domain_uuid;
|
||||
$device_profile_keys[$id]['device_profile_uuid'] = $device_profile_uuid;
|
||||
$device_profile_keys[$id]['device_profile_key_uuid'] = '';
|
||||
$device_profile_keys[$id]['profile_key_category'] = '';
|
||||
$device_profile_keys[$id]['profile_key_id'] = '';
|
||||
$device_profile_keys[$id]['profile_key_vendor'] = '';
|
||||
$device_profile_keys[$id]['profile_key_type'] = '';
|
||||
$device_profile_keys[$id]['profile_key_line'] = '';
|
||||
$device_profile_keys[$id]['profile_key_value'] = '';
|
||||
$device_profile_keys[$id]['profile_key_extension'] = '';
|
||||
$device_profile_keys[$id]['profile_key_protected'] = '';
|
||||
$device_profile_keys[$id]['profile_key_label'] = '';
|
||||
$device_profile_keys[$id]['profile_key_icon'] = '';
|
||||
$id++;
|
||||
}
|
||||
|
||||
//get the child data
|
||||
if (strlen($device_profile_uuid) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user