Adding country code to contact edit. (#6210)
* Adding country code to the contact edit. * Adding country code languages for contact edit. * Update contact_phone_edit.php
This commit is contained in:
parent
dbd4808122
commit
98240a2227
|
|
@ -459,6 +459,10 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_label";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Custom label for the number";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_type_voice";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for voice calls.";
|
||||
|
|
@ -475,13 +479,13 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Number is used for text messages.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_label";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_speed_dial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Custom label for the number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the speed dial.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_primary";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_country_code";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Designate a primary number.";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the country code.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
|
|
@ -491,10 +495,11 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the extension.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_speed_dial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the speed dial.";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_primary";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Designate a primary number.";
|
||||
$z++;
|
||||
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "phone_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the description.";
|
||||
|
|
|
|||
|
|
@ -1937,6 +1937,28 @@ $text['label-phone_speed_dial']['ru-ru'] = "Быстрый Набор";
|
|||
$text['label-phone_speed_dial']['sv-se'] = "Snabb Nummer";
|
||||
$text['label-phone_speed_dial']['uk-ua'] = "";
|
||||
|
||||
$text['label-phone_country_code']['en-us'] = "Country Code";
|
||||
$text['label-phone_country_code']['en-gb'] = "Country Code";
|
||||
$text['label-phone_country_code']['ar-eg'] = "";
|
||||
$text['label-phone_country_code']['de-at'] = ""; //copied from de-de
|
||||
$text['label-phone_country_code']['de-ch'] = ""; //copied from de-de
|
||||
$text['label-phone_country_code']['de-de'] = "";
|
||||
$text['label-phone_country_code']['el-gr'] = "";
|
||||
$text['label-phone_country_code']['es-cl'] = "";
|
||||
$text['label-phone_country_code']['es-mx'] = "";
|
||||
$text['label-phone_country_code']['fr-ca'] = "";
|
||||
$text['label-phone_country_code']['fr-fr'] = "";
|
||||
$text['label-phone_country_code']['he-il'] = "";
|
||||
$text['label-phone_country_code']['it-it'] = "";
|
||||
$text['label-phone_country_code']['nl-nl'] = "";
|
||||
$text['label-phone_country_code']['pl-pl'] = "";
|
||||
$text['label-phone_country_code']['pt-br'] = "";
|
||||
$text['label-phone_country_code']['pt-pt'] = "";
|
||||
$text['label-phone_country_code']['ro-ro'] = "";
|
||||
$text['label-phone_country_code']['ru-ru'] = "";
|
||||
$text['label-phone_country_code']['sv-se'] = "";
|
||||
$text['label-phone_country_code']['uk-ua'] = "";
|
||||
|
||||
$text['label-phone_numbers']['en-us'] = "Numbers";
|
||||
$text['label-phone_numbers']['en-gb'] = "Numbers";
|
||||
$text['label-phone_numbers']['ar-eg'] = "";
|
||||
|
|
@ -4445,6 +4467,28 @@ $text['description-phone_speed_dial']['ru-ru'] = "Введите номер бы
|
|||
$text['description-phone_speed_dial']['sv-se'] = "Ange snabbknappens nummer.";
|
||||
$text['description-phone_speed_dial']['uk-ua'] = "";
|
||||
|
||||
$text['description-phone_country_code']['en-us'] = "Enter the country code.";
|
||||
$text['description-phone_country_code']['en-gb'] = "Enter the country code.";
|
||||
$text['description-phone_country_code']['ar-eg'] = "";
|
||||
$text['description-phone_country_code']['de-at'] = "";
|
||||
$text['description-phone_country_code']['de-ch'] = "";
|
||||
$text['description-phone_country_code']['de-de'] = "";
|
||||
$text['description-phone_country_code']['el-gr'] = "";
|
||||
$text['description-phone_country_code']['es-cl'] = "";
|
||||
$text['description-phone_country_code']['es-mx'] = "";
|
||||
$text['description-phone_country_code']['fr-ca'] = "";
|
||||
$text['description-phone_country_code']['fr-fr'] = "";
|
||||
$text['description-phone_country_code']['he-il'] = "";
|
||||
$text['description-phone_country_code']['it-it'] = "";
|
||||
$text['description-phone_country_code']['nl-nl'] = "";
|
||||
$text['description-phone_country_code']['pl-pl'] = "";
|
||||
$text['description-phone_country_code']['pt-br'] = "";
|
||||
$text['description-phone_country_code']['pt-pt'] = "";
|
||||
$text['description-phone_country_code']['ro-ro'] = "";
|
||||
$text['description-phone_country_code']['ru-ru'] = "";
|
||||
$text['description-phone_country_code']['sv-se'] = "";
|
||||
$text['description-phone_country_code']['uk-ua'] = "";
|
||||
|
||||
$text['description-phone_number']['en-us'] = "Enter the phone number.";
|
||||
$text['description-phone_number']['en-gb'] = "Enter the phone number.";
|
||||
$text['description-phone_number']['ar-eg'] = "";
|
||||
|
|
|
|||
|
|
@ -319,13 +319,14 @@
|
|||
$array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid;
|
||||
$array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_label'] = $row["phone_label"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_number'] = $row["phone_number"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_extension'] = $row["phone_extension"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_speed_dial'] = $row["phone_speed_dial"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_type_voice'] = $row["phone_type_voice"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_type_fax'] = $row["phone_type_fax"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_type_video'] = $row["phone_type_video"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_type_text'] = $row["phone_type_text"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_speed_dial'] = $row["phone_speed_dial"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_country_code'] = $row["phone_country_code"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_number'] = $row["phone_number"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_extension'] = $row["phone_extension"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_primary'] = $row["phone_primary"];
|
||||
$array['contacts'][0]['contact_phones'][$y]['phone_description'] = $row["phone_description"];
|
||||
$y++;
|
||||
|
|
@ -657,6 +658,7 @@
|
|||
$contact_phones[$x]['contact_uuid'] = $contact_uuid;
|
||||
$contact_phones[$x]['contact_phone_uuid'] = uuid();
|
||||
$contact_phones[$x]['phone_label'] = '';
|
||||
$contact_phones[$x]['phone_country_code'] = '';
|
||||
$contact_phones[$x]['phone_number'] = '';
|
||||
$contact_phones[$x]['phone_extension'] = '';
|
||||
$contact_phones[$x]['phone_speed_dial'] = '';
|
||||
|
|
@ -1600,6 +1602,14 @@ if (permission_exists('contact_phone_view')) {
|
|||
//echo $text['description-phone_extension']."\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-phone_country_code']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field no-wrap'>\n";
|
||||
echo " <input class='formfld' type='text' name='contact_phones[$x][phone_country_code]' placeholder='' maxlength='6' style='' value=\"".escape($row["phone_country_code"])."\">\n";
|
||||
//echo $text['description-phone_country_code']."\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='label required'>\n";
|
||||
echo " ".$text['label-phone_number']."\n";
|
||||
echo " </div>\n";
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
$phone_label = $_POST["phone_label"];
|
||||
$phone_label_custom = $_POST["phone_label_custom"];
|
||||
$phone_speed_dial = $_POST["phone_speed_dial"];
|
||||
$phone_country_code = $_POST["phone_country_code"];
|
||||
$phone_number = $_POST["phone_number"];
|
||||
$phone_extension = $_POST["phone_extension"];
|
||||
$phone_primary = $_POST["phone_primary"];
|
||||
|
|
@ -166,6 +167,7 @@
|
|||
$array['contact_phones'][0]['phone_type_text'] = $phone_type_text ? 1 : null;
|
||||
$array['contact_phones'][0]['phone_label'] = $phone_label;
|
||||
$array['contact_phones'][0]['phone_speed_dial'] = $phone_speed_dial;
|
||||
$array['contact_phones'][0]['phone_country_code'] = $phone_country_code;
|
||||
$array['contact_phones'][0]['phone_number'] = $phone_number;
|
||||
$array['contact_phones'][0]['phone_extension'] = $phone_extension;
|
||||
$array['contact_phones'][0]['phone_primary'] = $phone_primary ? 1 : 0;
|
||||
|
|
@ -202,6 +204,7 @@
|
|||
$phone_type_text = $row["phone_type_text"];
|
||||
$phone_label = $row["phone_label"];
|
||||
$phone_speed_dial = $row["phone_speed_dial"];
|
||||
$phone_country_code = $row["phone_country_code"];
|
||||
$phone_number = $row["phone_number"];
|
||||
$phone_extension = $row["phone_extension"];
|
||||
$phone_primary = $row["phone_primary"];
|
||||
|
|
@ -319,6 +322,17 @@
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-phone_country_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='phone_country_code' maxlength='6' min='0' step='1' value=\"".escape($phone_country_code)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-phone_country_code']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-phone_number']."\n";
|
||||
|
|
@ -380,4 +394,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue