[FEATURE] Enable HTML5 input types 43/55643/2
authorStanislas Rolland <typo3@sjbr.ca>
Sat, 10 Feb 2018 04:27:44 +0000 (23:27 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Sat, 10 Feb 2018 04:32:21 +0000 (05:32 +0100)
HTML5 input types are enabled and the default HTML template is
modified accordingly. In order to support the date input type, the
following changes are introduced:
- the TS constants and setup variables dateFormat and dateSplit
  are dropped;
- the rendering format of dates in input forms is left to the browser;
- the rendering format of dates in other contexts is specified in file
  locallang.xlf as index dateFormat, thus allowing for varying formats
  depending on language.

Resolves: #65630
Change-Id: I7620b796e21dae53be96cf56fa82a76daca62f4e
Reviewed-on: https://review.typo3.org/55643
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Classes/Domain/Data.php
Classes/View/CreateView.php
Classes/View/EditView.php
Classes/View/Marker.php
Configuration/TypoScript/PluginSetup/constants.txt
Configuration/TypoScript/PluginSetup/setup.txt
Resources/Private/Language/locallang.xlf
Resources/Private/Templates/RegisterHtmlTemplate.html
Resources/Public/JavaScript/jsfunc.updateform.js

index 9a053b7..bc02e48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2018-02-09 Stanislas Rolland  <typo3(arobas)sjbr.ca>
        * Resolves #83833: Salutation does not match in registration and response for "Ms" and "Mrs"
        * Resolves #77055: Password again may be entered alone without error being raised
+       * Resolves #65630: Enable HTML5 input types
 
 2018-02-08 Stanislas Rolland  <typo3(arobas)sjbr.ca>
        * Resolves #76119: Profile or password editing fails
index db83a95..0330334 100644 (file)
@@ -756,7 +756,7 @@ class Data
                                                                if (
                                                                        !is_array($dataArray[$theField])
                                                                        && $dataArray[$theField]
-                                                                       && !$this->evalDate($dataArray[$theField], $this->conf['dateFormat'])
+                                                                       && !$this->evalDate($dataArray[$theField])
                                                                ) {
                                                                        $failureArray[] = $theField;
                                                                        $this->inError[$theField] = true;
@@ -966,8 +966,8 @@ class Data
                                                                }
                                                                break;
                                                        case 'date':
-                                                               if ($dataValue && $this->evalDate($dataValue, $this->conf['dateFormat'])) {
-                                                                       $dateArray = $this->fetchDate($dataValue, $this->conf['dateFormat']);
+                                                               if ($dataValue && $this->evalDate($dataValue)) {
+                                                                       $dateArray = $this->fetchDate($dataValue);
                                                                        $dataValue = $dateArray['y'] . '-' . $dateArray['m'] . '-'.$dateArray['d'];
                                                                        $translateArray = array(
                                                                                'd' => ($dateArray['d'] < 10 ? '0'.$dateArray['d'] : $dateArray['d']),
@@ -979,7 +979,7 @@ class Data
                                                                        );
                                                                        $searchArray = array_keys($translateArray);
                                                                        $replaceArray = array_values($translateArray);
-                                                                       $dataValue = str_replace($searchArray, $replaceArray, $this->conf['dateFormat']);
+                                                                       $dataValue = str_replace($searchArray, $replaceArray, 'Y-m-d');
                                                                } else if (!isset($dataArray[$theField])) {
                                                                        $bValueAssigned = false;
                                                                }
@@ -1430,15 +1430,11 @@ class Data
        /**
         * Check if the value is a correct date in format yyyy-mm-dd
         */
-       public function fetchDate($value, $dateFormat) {
-
+       protected function fetchDate($value, $dateFormat = 'Y-m-d')
+       {
                $rcArray = array('m' => '', 'd' => '', 'y' => '');
                $dateValue = trim($value);
-               $split = $this->conf['dateSplit'];
-               if (!$split) {
-                       $split = '-';
-               }
-               $split = '/' . $split . '/';
+               $split = '/-/';
                $dateFormatArray = preg_split($split, $dateFormat);
                $dateValueArray = preg_split($split, $dateValue);
 
@@ -1489,11 +1485,11 @@ class Data
         *
         *  Check if the value is a correct date in format yyyy-mm-dd
         */
-       public function evalDate($value, $dateFormat) {
+       protected function evalDate($value, $dateFormat = 'Y-m-d') {
                if( !$value) {
                        return false;
                }
-               $dateArray = $this->fetchDate($value, $dateFormat);
+               $dateArray = $this->fetchDate($value);
 
                if(is_numeric($dateArray['y']) && is_numeric($dateArray['m']) && is_numeric($dateArray['d'])) {
                        $rc = checkdate($dateArray['m'], $dateArray['d'], $dateArray['y']);
@@ -1768,7 +1764,7 @@ class Data
                                                        case 'date':
                                                        case 'adodb_date':
                                                                if ($origArray[$theField]) {
-                                                                       $parsedArray[$theField] = date($this->conf['dateFormat'], $origArray[$theField]);
+                                                                       $parsedArray[$theField] = date('Y-m-d', $origArray[$theField]);
                                                                }
                                                                if (!$parsedArray[$theField]) {
                                                                        if ($bUnsetZero) {
@@ -1811,7 +1807,7 @@ class Data
                                                } else {
                                                        $parsedArray[$theField] = $dataArray[$theField];
                                                }
-                                               $dateArray = $this->fetchDate($parsedArray[$theField], $this->conf['dateFormat']);
+                                               $dateArray = $this->fetchDate($parsedArray[$theField]);
                                        }
                                        switch ($theCmd) {
                                                case 'date':
index 91f6698..113c3c1 100644 (file)
@@ -87,7 +87,7 @@ class CreateView extends AbstractView
                        $requiredFileds = $this->data->getRequiredFieldsArray($cmdKey);
                        $infoFields = $this->data->getFieldList();
                        $templateCode = $this->marker->removeRequired($templateCode, $this->data->getFailure(), $requiredFileds, $infoFields, $this->data->getSpecialFieldList(), $cmdKey, $isPreview);
-                       $this->marker->fillInMarkerArray($currentArray, $securedArray, '', true);
+                       $this->marker->fillInMarkerArray($currentArray, $securedArray, '', true, 'FIELD_', true, $isPreview);
                        $this->marker->addStaticInfoMarkers($dataArray, $isPreview);
                        $this->marker->addTcaMarkers($dataArray, $origArray, $cmd, $cmdKey, $isPreview, $requiredFileds);
                        $this->marker->addAdditionalMarkers($infoFields, $cmd, $cmdKey, $currentArray, $isPreview);
index 9f5570e..914cec4 100644 (file)
@@ -71,7 +71,7 @@ class EditView extends AbstractView
                $requiredFields = $this->data->getRequiredFieldsArray($cmdKey);
                $this->marker->addPasswordTransmissionMarkers($this->getUsePassword(), $this->getUsePasswordAgain());
                $templateCode = $this->marker->removeRequired($templateCode, $this->data->getFailure(), $requiredFields, $infoFields, $this->data->getSpecialFieldList(), $cmdKey, $isPreview);
-               $this->marker->fillInMarkerArray($currentArray, $securedArray, '', true);
+               $this->marker->fillInMarkerArray($currentArray, $securedArray, '', true, 'FIELD_', true, $isPreview);
                if ($cmdKey !== 'password') {
                        $this->marker->addStaticInfoMarkers($currentArray, $isPreview);
                }
index 0c15795..5c49455 100644 (file)
@@ -1077,12 +1077,13 @@ class Marker
         *
         * @param array An array with keys found in the $fieldList (typically a record) which values should be moved to the $markContentArray
         * @param string A list of fields from the $row array to add to the $markContentArray array. If empty all fields from $row will be added (unless they are integers)
-        * @param boolean If set, all values added to $markContentArray will be nl2br()'ed
+        * @param bool If set, all values added to $markContentArray will be nl2br()'ed
         * @param string Prefix string to the fieldname before it is added as a key in the $markContentArray. Notice that the keys added to the $markContentArray always start and end with "###"
-        * @param boolean If set, all values are passed through htmlspecialchars() - RECOMMENDED to avoid most obvious XSS and maintain XHTML compliance.
+        * @param bool If set, all values are passed through htmlspecialchars() - RECOMMENDED to avoid most obvious XSS and maintain XHTML compliance.
+        * @param bool $viewOnly: whether this is rendering for view only or for form input fields
         * @return array The modified $markContentArray
         */
-       public function fillInMarkerArray(array $row, array $securedArray, $fieldList = '', $nl2br = true, $prefix = 'FIELD_', $hsc = true) {
+       public function fillInMarkerArray(array $row, array $securedArray, $fieldList = '', $nl2br = true, $prefix = 'FIELD_', $hsc = true, $viewOnly = true) {
                $markerArray = $this->getMarkerArray();
                if (is_array($securedArray)) {
                        foreach ($securedArray as $field => $value) {
@@ -1092,6 +1093,9 @@ class Marker
                if (!empty($fieldList)) {
                        $fieldArray = GeneralUtility::trimExplode(',', $fieldList, true);
                        foreach ($fieldArray as $field) {
+                               if ($viewOnly && $GLOBALS['TCA'][$this->theTable]['columns'][$field]['config']['eval'] === 'date') {
+                                       $row[$field] = $this->formatDateForViewOnly($row[$field]);
+                               }
                                $markerArray['###' . $prefix . $field . '###'] = $nl2br ? nl2br($row[$field]) : $row[$field];
                        }
                } else {
@@ -1102,6 +1106,9 @@ class Marker
                                if ($hsc) {
                                        $value = htmlspecialchars($value);
                                }
+                               if ($viewOnly && $GLOBALS['TCA'][$this->theTable]['columns'][$field]['config']['eval'] === 'date') {
+                                       $value = $this->formatDateForViewOnly($value);
+                               }
                                $markerArray['###' . $prefix . $field . '###'] = $nl2br ? nl2br($value) : $value;
                        }
                }
@@ -1127,6 +1134,19 @@ class Marker
        }
 
        /**
+        * Format date for display
+        *
+        * @param string $date: date in format yyyy-mm-dd
+        * @return string date formated according to localized date format
+        */
+       public function formatDateForViewOnly($date)
+       {
+               $dateFormat = LocalizationUtility::translate('dateFormat', $this->extensionName);
+               $timestamp = mktime(0, 0, 0, (int)substr($date, 5, 2), (int)substr($date, 8, 2), (int)substr($date, 0, 4));
+               return strftime($dateFormat, $timestamp);
+       }
+
+       /**
         * Removes required and error sub-parts when there are no errors
         *
         * Works like this:
index 574bbf6..77a3c9f 100644 (file)
@@ -233,10 +233,4 @@ plugin.tx_srfeuserregister_pi1 {
 \r
     # cat=plugin.tx_srfeuserregister_pi1/enable; type=boolean; label= Local country: If set, the country names are shown in their local languages\r
   useLocalCountry = 0\r
-\r
-    # cat=plugin.tx_srfeuserregister_pi1//; type=string; label= Date Format (d-m-y)\r
-  dateFormat = d-m-Y\r
-\r
-    # cat=plugin.tx_srfeuserregister_pi1//; type=string; label= Split char for Date Format (-)\r
-  dateSplit = -\r
 }
\ No newline at end of file
index cab6993..ecdebeb 100644 (file)
@@ -28,8 +28,6 @@ plugin.tx_srfeuserregister_pi1 {
        shortUrlLife = {$plugin.tx_srfeuserregister_pi1.shortUrlLife}\r
        useLocalization = {$plugin.tx_srfeuserregister_pi1.useLocalization}\r
        useLocalCountry = {$plugin.tx_srfeuserregister_pi1.useLocalCountry}\r
-       dateFormat = {$plugin.tx_srfeuserregister_pi1.dateFormat}\r
-       dateSplit = {$plugin.tx_srfeuserregister_pi1.dateSplit}\r
 \r
        onChangeCountryAttribute = {$plugin.tx_srfeuserregister_pi1.onChangeCountryAttribute}\r
 \r
index f5b009e..c28103d 100644 (file)
                                <source>Select in the list the status that corresponds to the status of the invited person.</source>
                        </trans-unit>
                        <trans-unit id="date_of_birth" xml:space="preserve">
-                               <source>Date of birth (dd-mm-yyyy)</source>
+                               <source>Date of birth</source>
                        </trans-unit>
                        <trans-unit id="tooltip_date_of_birth" xml:space="preserve">
-                               <source>Enter your date of birth in the format day-month-year.</source>
+                               <source>Enter your date of birth.</source>
                        </trans-unit>
                        <trans-unit id="tooltip_date_of_birth_informal" xml:space="preserve">
-                               <source>Enter your date of birth in the format day-month-year.</source>
+                               <source>Enter your date of birth.</source>
                        </trans-unit>
                        <trans-unit id="tooltip_invitation_date_of_birth" xml:space="preserve">
                                <source>Enter the date of birth of the invited person.</source>
                        <trans-unit id="button_confirm_register" xml:space="preserve">
                                <source>Create account now!</source>
                        </trans-unit>
+                       <trans-unit id="button_send_invitation" xml:space="preserve">
+                               <source>Send invitation</source>
+                       </trans-unit>
+                       <trans-unit id="button_send_invitation_now" xml:space="preserve">
+                               <source>Send invitation now!</source>
+                       </trans-unit>
                        <trans-unit id="button_back_to_form" xml:space="preserve">
                                <source>Back to form</source>
                        </trans-unit>
@@ -1375,10 +1381,10 @@ If you wish to accept our invitation and confirm your registration in &lt;b&gt;%
                                <source>The entered letters did not correspond to the letters in the image.</source>
                        </trans-unit>
                        <trans-unit id="evalErrors_date" xml:space="preserve">
-                               <source>Please enter a valid date in format dd-mm-yyyy!</source>
+                               <source>Please enter a valid date!</source>
                        </trans-unit>
                        <trans-unit id="evalErrors_date_informal" xml:space="preserve">
-                               <source>Please enter a valid date in format dd-mm-yyyy!</source>
+                               <source>Please enter a valid date!</source>
                        </trans-unit>
                        <trans-unit id="evalErrors_email" xml:space="preserve">
                                <source>Please enter a valid e-mail address.</source>
@@ -1572,6 +1578,9 @@ If you wish to accept our invitation and confirm your registration in &lt;b&gt;%
                        <trans-unit id="missing_gender_informal" xml:space="preserve">
                                <source>Please enter your salutation!</source>
                        </trans-unit>
+                       <trans-unit id="dateFormat" xml:space="preserve">
+                               <source>%B %e, %Y</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>
\ No newline at end of file
index dce4f59..ddb1f6b 100644 (file)
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_DATE_OF_BIRTH###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
-               <input id="tx-srfeuserregister-pi1-date_of_birth" type="text" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
+               <input id="tx-srfeuserregister-pi1-date_of_birth" type="date" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_date_of_birth### -->\r
 \r
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_TELEPHONE###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
-               <input id="tx-srfeuserregister-pi1-telephone" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
+               <input id="tx-srfeuserregister-pi1-telephone" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_telephone### -->\r
 \r
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_FAX###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
-               <input id="tx-srfeuserregister-pi1-fax" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_FAX###" name="###NAME_FAX###" />\r
+               <input id="tx-srfeuserregister-pi1-fax" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_FAX###" name="###NAME_FAX###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_fax### -->\r
 \r
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_EMAIL###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
-               <input id="tx-srfeuserregister-pi1-email" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_EMAIL###" name="###NAME_EMAIL###" />\r
+               <input id="tx-srfeuserregister-pi1-email" type="email" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_EMAIL###" name="###NAME_EMAIL###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_email### -->\r
 \r
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_WWW###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
-               <input id="tx-srfeuserregister-pi1-www" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_WWW###" name="###NAME_WWW###" />\r
+               <input id="tx-srfeuserregister-pi1-www" type="url" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_WWW###" name="###NAME_WWW###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_www### -->\r
 \r
@@ -869,7 +869,7 @@ The user is informed that a message has been sent to his email address and that
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_DATE_OF_BIRTH###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
-               <input id="tx-srfeuserregister-pi1-date_of_birth" type="text" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_INVITATION_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
+               <input id="tx-srfeuserregister-pi1-date_of_birth" type="date" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_INVITATION_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_date_of_birth### -->\r
 \r
@@ -1013,7 +1013,7 @@ The user is informed that a message has been sent to his email address and that
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_TELEPHONE###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
-               <input id="tx-srfeuserregister-pi1-telephone" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_INVITATION_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
+               <input id="tx-srfeuserregister-pi1-telephone" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_INVITATION_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_telephone### -->\r
 \r
@@ -1028,7 +1028,7 @@ The user is informed that a message has been sent to his email address and that
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_FAX###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
-               <input id="tx-srfeuserregister-pi1-fax" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_INVITATION_FAX###" name="###NAME_FAX###" />\r
+               <input id="tx-srfeuserregister-pi1-fax" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_INVITATION_FAX###" name="###NAME_FAX###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_fax### -->\r
 \r
@@ -1043,7 +1043,7 @@ The user is informed that a message has been sent to his email address and that
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_EMAIL###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
-               <input id="tx-srfeuserregister-pi1-email" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_INVITATION_EMAIL###" name="###NAME_EMAIL###" />\r
+               <input id="tx-srfeuserregister-pi1-email" type="email" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_INVITATION_EMAIL###" name="###NAME_EMAIL###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_email### -->\r
 \r
@@ -1141,7 +1141,7 @@ The user is informed that a message has been sent to his email address and that
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_WWW###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
-               <input id="tx-srfeuserregister-pi1-www" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_INVITATION_WWW###" name="###NAME_WWW###" />\r
+               <input id="tx-srfeuserregister-pi1-www" type="url" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_INVITATION_WWW###" name="###NAME_WWW###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_www### -->\r
 \r
@@ -1163,7 +1163,7 @@ The user is informed that a message has been sent to his email address and that
        <dt>&nbsp;</dt>\r
        <dd>\r
                ###HIDDENFIELDS###\r
-               <input type="submit" class="tx-srfeuserregister-pi1-submit" name="tx_srfeuserregister_pi1[submit]" value="###LABEL_BUTTON_REGISTER###" />\r
+               <input type="submit" class="tx-srfeuserregister-pi1-submit" name="tx_srfeuserregister_pi1[submit]" value="###LABEL_BUTTON_SEND_INVITATION###" />\r
        </dd>\r
 </dl>\r
 </fieldset>\r
@@ -1321,7 +1321,7 @@ The user is informed that a message has been sent to his email address and that
 <dt>&nbsp;</dt>\r
 <dd>\r
        ###HIDDENFIELDS###\r
-       <input type="submit" class="tx-srfeuserregister-pi1-submit" name="tx_srfeuserregister_pi1[submit]" value="###LABEL_BUTTON_CONFIRM_REGISTER###" />\r
+       <input type="submit" class="tx-srfeuserregister-pi1-submit" name="tx_srfeuserregister_pi1[submit]" value="###LABEL_BUTTON_SEND_INVITATION_NOW###" />\r
        <input type="submit" class="tx-srfeuserregister-pi1-submit" name="tx_srfeuserregister_pi1[doNotSave]" value="###LABEL_BUTTON_BACK_TO_FORM###" />\r
 </dd>\r
 \r
@@ -1478,7 +1478,7 @@ The user is informed that a message has been sent to the email address and that
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_DATE_OF_BIRTH###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_date_of_birth### -->\r
-               <input id="tx-srfeuserregister-pi1-date_of_birth" type="text" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
+               <input id="tx-srfeuserregister-pi1-date_of_birth" type="date" class="tx-srfeuserregister-pi1-text" size="10" maxlength="###MAXLENGTH_date_of_birth###" title="###TOOLTIP_DATE_OF_BIRTH###" name="###NAME_DATE_OF_BIRTH###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_date_of_birth### -->\r
 \r
@@ -1622,7 +1622,7 @@ The user is informed that a message has been sent to the email address and that
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_TELEPHONE###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_telephone### -->\r
-               <input id="tx-srfeuserregister-pi1-telephone" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
+               <input id="tx-srfeuserregister-pi1-telephone" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_telephone###" title="###TOOLTIP_TELEPHONE###" name="###NAME_TELEPHONE###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_telephone### -->\r
 \r
@@ -1637,7 +1637,7 @@ The user is informed that a message has been sent to the email address and that
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_FAX###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_fax### -->\r
-               <input id="tx-srfeuserregister-pi1-fax" type="text" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_FAX###" name="###NAME_FAX###" />\r
+               <input id="tx-srfeuserregister-pi1-fax" type="tel" class="tx-srfeuserregister-pi1-text" size="25" maxlength="###MAXLENGTH_fax###" title="###TOOLTIP_FAX###" name="###NAME_FAX###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_fax### -->\r
 \r
@@ -1652,7 +1652,7 @@ The user is informed that a message has been sent to the email address and that
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_EMAIL###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_email### -->\r
-               <input id="tx-srfeuserregister-pi1-email" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_EMAIL###" name="###NAME_EMAIL###" />\r
+               <input id="tx-srfeuserregister-pi1-email" type="email" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_email###" title="###TOOLTIP_EMAIL###" name="###NAME_EMAIL###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_email### -->\r
 \r
@@ -1749,7 +1749,7 @@ The user is informed that a message has been sent to the email address and that
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
                <p class="tx-srfeuserregister-pi1-error">###MISSING_WWW###</p>\r
                <!-- ###SUB_REQUIRED_FIELD_www### -->\r
-               <input id="tx-srfeuserregister-pi1-www" type="text" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_WWW###" name="###NAME_WWW###" />\r
+               <input id="tx-srfeuserregister-pi1-www" type="url" class="tx-srfeuserregister-pi1-text" size="40" maxlength="###MAXLENGTH_www###" title="###TOOLTIP_WWW###" name="###NAME_WWW###" />\r
        </dd>\r
        <!-- ###SUB_INCLUDED_FIELD_www### -->\r
 \r
index f486bf9..141ae03 100644 (file)
@@ -37,16 +37,9 @@ function updateForm(formId,fieldname,value)  {
                var fObj = formObj[fieldname];
                var type=fObj.type;
                if (!fObj.type) {
-                       type="radio";
+                       type="text";
                }
-               switch(type)    {
-                       case "text":
-                       case "textarea":
-                       case "email":
-                       case "number":
-                       case "hidden":
-                               fObj.value = htmlSpecialChars_decode(value);
-                               break;
+               switch(type) {
                        case "password":
                                fObj.value = value;
                                break;
@@ -64,7 +57,7 @@ function updateForm(formId,fieldname,value)   {
                        case "select-multiple":
                                var l=fObj.length;
                                for (a=0;a<l;a++)       {
-                                       if (fObj.options[a].value == value)     {
+                                       if (fObj.options[a].value == value) {
                                                fObj.options[a].selected = 1;
                                        }
                                }
@@ -72,12 +65,13 @@ function updateForm(formId,fieldname,value) {
                        case "radio":
                                var l=fObj.length;
                                for (a=0; a<l;a++)      {
-                                       if (fObj[a].value==value)       {
+                                       if (fObj[a].value==value) {
                                                fObj[a].checked = 1;
                                        }
                                }
                        break;
                        default:
+                               fObj.value = htmlSpecialChars_decode(value);
                }
        }
 }