Browse Source

Merge pull request #793 from AngelFQC/BT10139

Solve comments in 5764355 - refs BT#10139
Angel Fernando Quiroz Campos 9 years ago
parent
commit
b47b6c0b7f

+ 6 - 6
main/inc/lib/extra_field.lib.php

@@ -342,10 +342,10 @@ class ExtraField extends Model
         $types[self::FIELD_TYPE_LETTERS_ONLY] = get_lang('FieldTypeOnlyLetters');
         $types[self::FIELD_TYPE_ALPHANUMERIC] = get_lang('FieldTypeAlphanumeric');
         $types[self::FIELD_TYPE_LETTERS_SPACE] = get_lang(
-            'FieldTypeLettersSpace'
+            'FieldTypeLettersSpaces'
         );
         $types[self::FIELD_TYPE_ALPHANUMERIC_SPACE] = get_lang(
-            'FieldTypeNoPunctuation'
+            'FieldTypeAlphanumericSpaces'
         );
 
         switch ($handler) {
@@ -1455,7 +1455,7 @@ EOF;
                         );
                         break;
                     case ExtraField::FIELD_TYPE_LETTERS_ONLY:
-                        $form->addLettersOnly(
+                        $form->addTextLettersOnly(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1470,7 +1470,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_ALPHANUMERIC:
-                        $form->addAlphanumeric(
+                        $form->addTextAlphanumeric(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1487,7 +1487,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_LETTERS_SPACE:
-                        $form->addLettersAndSpaces(
+                        $form->addTextLettersAndSpaces(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );
@@ -1502,7 +1502,7 @@ EOF;
                         }
                         break;
                     case ExtraField::FIELD_TYPE_ALPHANUMERIC_SPACE:
-                        $form->addAlphanumericAndSpaces(
+                        $form->addTextAlphanumericAndSpaces(
                             "extra_{$field_details['variable']}",
                             $field_details['display_text']
                         );

+ 7 - 7
main/inc/lib/formvalidator/FormValidator.class.php

@@ -1040,7 +1040,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addLettersOnly(
+    public function addTextLettersOnly(
         $name,
         $label,
         $required = false,
@@ -1087,7 +1087,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addAlphanumeric(
+    public function addTextAlphanumeric(
         $name,
         $label,
         $required = false,
@@ -1134,7 +1134,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addLettersAndSpaces(
+    public function addTextLettersAndSpaces(
         $name,
         $label,
         $required = false,
@@ -1145,7 +1145,7 @@ EOT;
             $attributes,
             [
                 'pattern' => '[a-zA-ZñÑ\s]+',
-                'title' => get_lang('OnlyLettersAndSpace')
+                'title' => get_lang('OnlyLettersAndSpaces')
             ]
         );
 
@@ -1154,7 +1154,7 @@ EOT;
             $name,
             [
                 $label,
-                get_lang('OnlyLettersAndSpace')
+                get_lang('OnlyLettersAndSpaces')
             ],
             $attributes
         );
@@ -1167,7 +1167,7 @@ EOT;
 
         $this->addRule(
             $name,
-            get_lang('OnlyLettersAndSpace'),
+            get_lang('OnlyLettersAndSpaces'),
             'regex',
             '/^[a-zA-ZñÑ\s]+$/'
         );
@@ -1181,7 +1181,7 @@ EOT;
      * @param bool $required	Optional. Is the form-element required (default=true)
      * @param array $attributes Optional. List of attributes for the form-element
      */
-    public function addAlphanumericAndSpaces(
+    public function addTextAlphanumericAndSpaces(
         $name,
         $label,
         $required = false,

+ 7 - 2
main/lang/english/trad4all.inc.php

@@ -7449,8 +7449,8 @@ To set a the new password you need to activate it. To do this, please click this
 If you did not request this procedure, then please ignore this message. If you keep receiving it, please contact the portal administrator.";
 $CronRemindCourseExpirationActivateText = "Remind Course Expiration cron";
 $CronRemindCourseExpirationActivateComment = "Enable the Remind Course Expiration cron";
-$CronRemindCourseExpirationFrecuencyText = "Frecuency for the Remind Course Expiration cron";
-$CronRemindCourseExpirationFrecuencyComment = "Number of days before the expiration of the course to consider to send reminder mail";
+$CronRemindCourseExpirationFrequencyText = "Frecuency for the Remind Course Expiration cron";
+$CronRemindCourseExpirationFrequencyComment = "Number of days before the expiration of the course to consider to send reminder mail";
 $CronCourseFinishedActivateText = "Course Finished cron";
 $CronCourseFinishedActivateComment = "Activate the Course Finished cron";
 $MailCronCourseFinishedSubject = "End of course %s";
@@ -7482,4 +7482,9 @@ $AtTime = " at";
 $SendSubscriptionNotification = "Send mail notification for subscription";
 $SendAnEmailWhenAUserBeingSubscribed = "Send an email when a user being subscribed to session";
 $SelectDate = "Select date";
+$OnlyLettersAndSpaces = "Only letters and spaces";
+$OnlyLettersAndNumbersAndSpaces = "Only letters, numbers and spaces";
+$FieldTypeLettersSpaces = "Text letters and spaces";
+$CronRemindCourseFinishedActivateText = "Send course finished notification";
+$FieldTypeAlphanumericSpaces = "Text alphanumeric characters and spaces";
 ?>

+ 6 - 2
main/lang/spanish/trad4all.inc.php

@@ -7474,8 +7474,8 @@ $ResetPasswordCommentWithUrl = "Ha recibido este mensaje porque Usted (o alguien
 Si no ha pedido un cambio de contraseña, puede ignorar este mensaje. No obstante, si vuelve a recibirlo repetidamente, por favor comuníquese con el administrador de su portal.";
 $CronRemindCourseExpirationActivateText = "Cron de Recordatorio de Expiración de Curso";
 $CronRemindCourseExpirationActivateComment = "Habilitar el cron de envío de recordatorio de expiración de cursos";
-$CronRemindCourseExpirationFrecuencyText = "Frecuencia del recordatorio de expiración de curso";
-$CronRemindCourseExpirationFrecuencyComment = "Número de días antes de la expiración del curso a considerar para enviar el correo electrónico de recordatorio";
+$CronRemindCourseExpirationFrequencyText = "Frecuencia del recordatorio de expiración de curso";
+$CronRemindCourseExpirationFrequencyComment = "Número de días antes de la expiración del curso a considerar para enviar el correo electrónico de recordatorio";
 $CronCourseFinishedActivateText = "Cron de finalización de curso";
 $CronCourseFinishedActivateComment = "Activar el cron de finalización de curso";
 $MailCronCourseFinishedSubject = "Fin del curso %s";
@@ -7507,4 +7507,8 @@ $AtTime = "a las";
 $SendSubscriptionNotification = "Enviar notificación de suscripción por correo electrónico";
 $SendAnEmailWhenAUserBeingSubscribed = "Enviar un correo electrónico cuando un usuario está suscrito a la sesión";
 $SelectDate = "Seleccionar fecha";
+$OnlyLettersAndSpaces = "Sólo letras y espacios";
+$OnlyLettersAndNumbersAndSpaces = "Sólo letras, números y espacios";
+$FieldTypeLettersSpaces = "Texto de letras y espacios";
+$FieldTypeAlphanumericSpaces = "Texto de caracteres alfanuméricos y espacios";
 ?>