From f136543476997a2dbf89cd8c5b75dee03ab08a6a Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 10 Jan 2014 05:23:46 +0000 Subject: [PATCH] Make the destination number required for time conditions. --- app/time_conditions/app_languages.php | 76 +++++++++++++++------- app/time_conditions/time_condition_add.php | 3 +- 2 files changed, 56 insertions(+), 23 deletions(-) diff --git a/app/time_conditions/app_languages.php b/app/time_conditions/app_languages.php index 36b20550b0..272a622e27 100644 --- a/app/time_conditions/app_languages.php +++ b/app/time_conditions/app_languages.php @@ -3,6 +3,7 @@ $text['title-time-condition-add']['en-us'] = "Time Conditions"; $text['title-time-condition-add']['pt-pt'] = "Condições Temporais"; $text['title-time-condition-add']['fr-fr'] = "Conditions Temporelles"; + $text['description-time-condition-add']['en-us'] = "Time conditions route calls based on time conditions. You can use time conditions to send calls to an IVR Menu, External numbers, Scripts, or other destinations."; $text['description-time-condition-add']['pt-pt'] = "As condições temporais encaminham as chamadas com base no tempo. Pode utilizar as condições temporais para enviar chamadas para um menu de IVR, números externos, scripts, ou outros destinos."; $text['description-time-condition-add']['fr-fr'] = "Configurer l'acheminement d'apppel en fonction de conditions temporelles. Ces conditions temporelles permettent de diriger les appels vers un menu SVI, un numéro externe, un script, ou tout autre destination."; @@ -14,6 +15,7 @@ $text['label-name']['en-us'] = "Name"; $text['label-name']['pt-pt'] = "Nome"; $text['label-name']['fr-fr'] = "Nom"; + $text['description-name']['en-us'] = "Enter the name for the time condition."; $text['description-name']['pt-pt'] = "Introduza o nome da condição temporal."; $text['description-name']['fr-fr'] = "Choisir un nom pour cette condition temporelle."; @@ -21,6 +23,7 @@ $text['label-extension']['en-us'] = "Extension"; $text['label-extension']['pt-pt'] = "Extensão"; $text['label-extension']['fr-fr'] = "Extension"; + $text['description-extension']['en-us'] = "Enter the extension number."; $text['description-extension']['pt-pt'] = "Introduza o número da extensão."; $text['description-extension']['fr-fr'] = "Choisir le numéro d'extension."; @@ -28,6 +31,7 @@ $text['label-template']['en-us'] = "Template"; $text['label-template']['pt-pt'] = "Template"; $text['label-template']['fr-fr'] = "Modèle"; + $text['description-template']['en-us'] = "The templates provides a list of preset time conditions."; $text['description-template']['pt-pt'] = "Os templates oferecem uma lista condições temporais."; $text['description-template']['fr-fr'] = "Le modèle fourni une liste de présélection."; @@ -36,9 +40,11 @@ $text['label-optgroup-office']['en-us'] = "Office"; $text['label-optgroup-office']['pt-pt'] = "Escritório"; $text['label-optgroup-office']['fr-fr'] = "Bureau"; + $text['label-option-office-8am-5pm']['en-us'] = "Office Hours Mon-Fri 8am-5pm"; $text['label-option-office-8am-5pm']['pt-pt'] = "Horas de Trabalho Seg-Sex 8h-17h"; $text['label-option-office-8am-5pm']['fr-fr'] = "Heures de Bureau Lun-Ven 8h-17h"; + $text['label-option-office-9am-6pm']['en-us'] = "Office Hours Mon-Fri 9am-6pm"; $text['label-option-office-9am-6pm']['pt-pt'] = "Horas de Trabalho Seg-Sex 9h-18h"; $text['label-option-office-9am-6pm']['fr-fr'] = "Heures de Bureau Lun-Ven 9h-18h"; @@ -46,159 +52,185 @@ $text['label-optgroup-us-holidays']['en-us'] = "US Holidays"; $text['label-optgroup-us-holidays']['pt-pt'] = "Férias US"; $text['label-optgroup-us-holidays']['fr-fr'] = "Vacances US"; + $text['label-option-us-holidays-new-year']['en-us'] = "New Year\'s Day"; $text['label-option-us-holidays-new-year']['pt-pt'] = "Dia de Ano Novo"; $text['label-option-us-holidays-new-year']['fr-fr'] = "Nouvel an"; + $text['label-option-us-holidays-martin-luther-king']['en-us'] = "Martin Luther King Jr Day"; $text['label-option-us-holidays-martin-luther-king']['pt-pt'] = "Dia de Martin Luther King Jr"; $text['label-option-us-holidays-martin-luther-king']['fr-fr'] = "Martin Luther King Jr Day"; + $text['label-option-us-holidays-president']['en-us'] = "Presidents Day"; $text['label-option-us-holidays-president']['pt-pt'] = "Dia dos Presidentes"; $text['label-option-us-holidays-president']['fr-fr'] = "Presidents Day"; + $text['label-option-us-holidays-memorial']['en-us'] = "Memorial Day"; $text['label-option-us-holidays-memorial']['pt-pt'] = "Dia do Memorial"; $text['label-option-us-holidays-memorial']['fr-fr'] = "Memorial Day"; + $text['label-option-us-holidays-independence']['en-us'] = "Independence Day"; $text['label-option-us-holidays-independence']['pt-pt'] = "Dia da Independência"; $text['label-option-us-holidays-independence']['fr-fr'] = "Independence Day"; + $text['label-option-us-holidays-labor']['en-us'] = "Labor Day"; $text['label-option-us-holidays-labor']['pt-pt'] = "Dia do Trabalho"; $text['label-option-us-holidays-labor']['fr-fr'] = "Labor Day"; + $text['label-option-us-holidays-columbus']['en-us'] = "Columbus Day"; $text['label-option-us-holidays-columbus']['pt-pt'] = "Dia de Colombo"; $text['label-option-us-holidays-columbus']['fr-fr'] = "Columbus Day"; + $text['label-option-us-holidays-veteran']['en-us'] = "Veteran\'s Day"; $text['label-option-us-holidays-veteran']['pt-pt'] = "Dia dos Veteranos"; $text['label-option-us-holidays-veteran']['fr-fr'] = "Veteran\'s Day"; + $text['label-option-us-holidays-thanksgiving']['en-us'] = "Thanksgiving"; $text['label-option-us-holidays-thanksgiving']['pt-pt'] = "Thanksgiving"; $text['label-option-us-holidays-thanksgiving']['fr-fr'] = "Thanksgiving"; + $text['label-option-us-holidays-christmas']['en-us'] = "Christmas"; $text['label-option-us-holidays-christmas']['pt-pt'] = "Natal"; $text['label-option-us-holidays-christmas']['fr-fr'] = "Noël"; + //end: TemplateOptions $text['label-day-of-month']['en-us'] = "Day of Month"; $text['label-day-of-month']['pt-pt'] = "Dia do Mês"; $text['label-day-of-month']['fr-fr'] = "Jour du Mois"; + $text['description-day-of-month']['en-us'] = "Enter the day of the month."; $text['description-day-of-month']['pt-pt'] = "Introduza o dia do mês."; $text['description-day-of-month']['fr-fr'] = "Choisir le jour du mois."; - + $text['label-day-of-week']['en-us'] = "Day of Week"; $text['label-day-of-week']['pt-pt'] = "Dia da Semana"; $text['label-day-of-week']['fr-fr'] = "Jour de la semaine"; + $text['description-day-of-week']['en-us'] = "Enter the day of the week. 1-7 (Sun=1, Mon=2, Tues=3)"; $text['description-day-of-week']['pt-pt'] = "Introduza o dia da semana. 1-7 (Dom=1, Seg=2, Ter=3)"; $text['description-day-of-week']['fr-fr'] = "Choisir le jour de la semaine. 1-7 (Dim=1, Lun=2, Mar=3)."; - + $text['label-minute-of-day']['en-us'] = "Minute of Day"; $text['label-minute-of-day']['pt-pt'] = "Minuto do Dia"; $text['label-minute-of-day']['fr-fr'] = "Minute de la journée"; + $text['description-minute-of-day']['en-us'] = "Enter the minute of the day. 1-1440 (midnight = 1, 8am=480, 9am=540, 6pm=1080)"; $text['description-minute-of-day']['pt-pt'] = "Introduza o minuto do dia. 1-1440 (meia-noite = 1, 8h=480, 9h=540, 18h=1080)"; $text['description-minute-of-day']['fr-fr'] = "Choisir la minute de la journée. 1-1440 (minuit = 1, 8h=480, 9h=540, 6h=1080)"; - + $text['label-month']['en-us'] = "Month"; $text['label-month']['pt-pt'] = "Mês"; $text['label-month']['fr-fr'] = "Mois"; + $text['description-month']['en-us'] = "Enter the month. 1-12 (Jan=1, Feb=2, Mar=3, April=4, May=5, Jun=6, July=7 etc.)"; $text['description-month']['pt-pt'] = "Introduza o mês. 1-12 (Jan=1, Fev=2, Mar=3, Abr=4, Maio=5, Junho=6, Julho=7 etc.)"; $text['description-month']['fr-fr'] = "Choisir le mois. 1-12 (Jan=1, Fev=2, Mar=3, Avr=4, Mai=5, etc.)."; - + $text['label-week-of-month']['en-us'] = "Week of Month"; $text['label-week-of-month']['pt-pt'] = "Semana do Mês"; $text['label-week-of-month']['fr-fr'] = "Semaine du Mois"; + $text['description-week-of-month']['en-us'] = "Enter the week of the month."; $text['description-week-of-month']['pt-pt'] = "Introduza a semana do mês."; $text['description-week-of-month']['fr-fr'] = "Choisir le numéro de la semaine dans le mois"; -//begin: show_advanced +//begin: show_advanced $text['label-show-advanced']['en-us'] = "Show Advanced"; $text['label-show-advanced']['pt-pt'] = "Opções Avançadas"; $text['label-show-advanced']['fr-fr'] = "Paramètres avancés"; + $text['button-advanced']['en-us'] = "Advanced"; $text['button-advanced']['pt-pt'] = "Avançadas"; $text['button-advanced']['fr-fr'] = "Afficher les paramètres avancés"; - + $text['label-day-of-year']['en-us'] = "Day of Year"; $text['label-day-of-year']['pt-pt'] = "Dia do Ano"; $text['label-day-of-year']['fr-fr'] = "Jour de l'année"; + $text['description-day-of-year']['en-us'] = "Enter the day of the year."; $text['description-day-of-year']['pt-pt'] = "Introduza o dia do ano."; $text['description-day-of-year']['fr-fr'] = "Choisir le numéro du jour de l'année."; - + $text['label-hour']['en-us'] = "Hour"; $text['label-hour']['pt-pt'] = "Hora"; $text['label-hour']['fr-fr'] = "Heure"; + $text['description-hour']['en-us'] = "Enter the hour."; $text['description-hour']['pt-pt'] = "Introduza a hora."; $text['description-hour']['fr-fr'] = "Choisir l'heure."; - + $text['label-minute']['en-us'] = "Minute"; $text['label-minute']['pt-pt'] = "Minuto"; $text['label-minute']['fr-fr'] = "Minute"; + $text['description-minute']['en-us'] = "Enter the minute."; $text['description-minute']['pt-pt'] = "Introduza o minuto."; $text['description-minute']['fr-fr'] = "Choisir la minute."; - + $text['label-week']['en-us'] = "Week"; $text['label-week']['pt-pt'] = "Semana"; $text['label-week']['fr-fr'] = "Semaine"; + $text['description-week']['en-us'] = "Enter the week."; $text['description-week']['pt-pt'] = "Introduza a semana."; $text['description-week']['fr-fr'] = "Choisir le numéro de la semaine."; - + $text['label-year']['en-us'] = "Year"; $text['label-year']['pt-pt'] = "Ano"; $text['label-year']['fr-fr'] = "Année"; + $text['description-year']['en-us'] = "Enter the year."; $text['description-year']['pt-pt'] = "Introduza o ano."; $text['description-year']['fr-fr'] = "Choisir l'année."; -//end: show_advanced +//end: show_advanced $text['label-true']['en-us'] = "true"; $text['label-true']['pt-pt'] = "sim"; $text['label-true']['fr-fr'] = "Oui"; - + $text['label-false']['en-us'] = "false"; $text['label-false']['pt-pt'] = "não"; $text['label-false']['fr-fr'] = "Non"; - + $text['label-action-when-true']['en-us'] = "Action when True"; $text['label-action-when-true']['pt-pt'] = "Acção quando Verdadeiro"; $text['label-action-when-true']['fr-fr'] = "Action quand Vrai"; - + $text['label-action-when-false']['en-us'] = "Action when False"; $text['label-action-when-false']['pt-pt'] = "Acção quando Falso"; $text['label-action-when-false']['fr-fr'] = "Action quand Faux"; - + $text['label-order']['en-us'] = "Order"; $text['label-order']['pt-pt'] = "Ordem"; $text['label-order']['fr-fr'] = "Ordre"; - + $text['label-enabled']['en-us'] = "Enabled"; $text['label-enabled']['pt-pt'] = "Activado"; $text['label-enabled']['fr-fr'] = "Actif"; - + $text['label-description']['en-us'] = "Description"; $text['label-description']['pt-pt'] = "Descrição"; $text['label-description']['fr-fr'] = "Description"; - + $text['button-save']['en-us'] = "Save"; $text['button-save']['pt-pt'] = "Guardar"; $text['button-save']['fr-fr'] = "Sauvegarder"; - + $text['label-required-domain_uuid']['en-us'] = "Please provide: domain_uuid"; $text['label-required-domain_uuid']['pt-pt'] = "Por favor indique: domain_uuid"; $text['label-required-domain_uuid']['fr-fr'] = "Merci d'indiquer: domain_uuid"; - + $text['label-required-dialplan_name']['en-us'] = "Please provide: Extension Name"; $text['label-required-dialplan_name']['pt-pt'] = "Por favor indique: Nome da Extensão"; $text['label-required-dialplan_name']['fr-fr'] = "Merci d'indiquer: Nom de l'extension"; - + + $text['label-required-dialplan_number']['en-us'] = "Please provide: Extension Number"; + $text['label-required-dialplan_number']['pt-pt'] = "Por favor indique: Número da Extensão"; + $text['label-required-dialplan_number']['fr-fr'] = "Merci d'indiquer: Numéro de l'extension"; + $text['confirm-update-complete']['en-us'] = "Update Complete"; $text['confirm-update-complete']['pt-pt'] = "Actualização Efectuada"; $text['confirm-update-complete']['fr-fr'] = "Mis à jour"; -?> +?> \ No newline at end of file diff --git a/app/time_conditions/time_condition_add.php b/app/time_conditions/time_condition_add.php index 0b923b8370..03f7a277a8 100644 --- a/app/time_conditions/time_condition_add.php +++ b/app/time_conditions/time_condition_add.php @@ -87,6 +87,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //check for all required data if (strlen($domain_uuid) == 0) { $msg .= "".$text['label-required-domain_uuid']."
\n"; } if (strlen($dialplan_name) == 0) { $msg .= "".$text['label-required-dialplan_name']."
\n"; } + if (strlen($dialplan_number) == 0) { $msg .= "".$text['label-required-dialplan_number']."
\n"; } //if (strlen($condition_field_1) == 0) { $msg .= "Please provide: Condition Field
\n"; } //if (strlen($condition_expression_1) == 0) { $msg .= "Please provide: Condition Expression
\n"; } //if (strlen($action_application_1) == 0) { $msg .= "Please provide: Action Application
\n"; } @@ -771,7 +772,7 @@ echo "\n"; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo " ".$text['label-extension'].":\n"; echo "\n"; echo "\n";