[FEATURE] Password fields in the Install tool 81/56781/2
authorGuido Schmechel <guido.schmechel@brandung.de>
Sun, 22 Apr 2018 17:23:12 +0000 (19:23 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 24 Apr 2018 00:13:10 +0000 (02:13 +0200)
Now it is possible to define password fields in the Install tool
configuration.

Now the field transport_smtp_password uses a password field.

Resolves: #81794
Releases: master
Change-Id: Ia7c297e0f6676885ebe2089aabfd5ae8e3b1a3df
Reviewed-on: https://review.typo3.org/56781
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml
typo3/sysext/core/Documentation/Changelog/master/Feature-81794-PasswordFieldsInTheInstallTool.rst [new file with mode: 0644]
typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php
typo3/sysext/install/Resources/Private/Partials/Settings/LocalConfiguration/SubSection.html

index 99267e5..b22a1c9 100644 (file)
@@ -478,7 +478,7 @@ MAIL:
             type: text
             description: '<em>only with transport=smtp</em>: If your SMTP server requires authentication, enter your username here.'
         transport_smtp_password:
-            type: text
+            type: password
             description: '<em>only with transport=smtp</em>: If your SMTP server requires authentication, enter your password here.'
         transport_sendmail_command:
             type: text
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-81794-PasswordFieldsInTheInstallTool.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-81794-PasswordFieldsInTheInstallTool.rst
new file mode 100644 (file)
index 0000000..23a66ec
--- /dev/null
@@ -0,0 +1,20 @@
+.. include:: ../../Includes.txt
+
+=====================================================
+Feature: #81794 - Password fields in the Install tool
+=====================================================
+
+See :issue:`81794`
+
+Description
+===========
+
+Now it is possible to define password fields in the Install tool configuration with "type : password".
+
+
+Impact
+======
+
+Field Mail/transport_smtp_password uses a password field.
+
+.. index:: LocalConfiguration
\ No newline at end of file
index 085f235..d5f441f 100644 (file)
@@ -125,6 +125,11 @@ class LocalConfigurationValueService
                         $itemData['value'] = $value;
                         $itemData['phpErrorCode'] = true;
                         break;
+                    case 'password':
+                        $itemData['type'] = 'password';
+                        $itemData['value'] = $value;
+                        $itemData['hideValue'] = true;
+                        break;
                     default:
                         $itemData['type'] = 'input';
                         $itemData['value'] = $value;
@@ -196,6 +201,8 @@ class LocalConfigurationValueService
                     $messageBody = 'New value = none';
                 } elseif (is_array($value)) {
                     $messageBody = "New value = ['" . implode("', '", $value) . "']";
+                } elseif ($dataType === 'password') {
+                    $messageBody = 'New value is set';
                 } else {
                     $messageBody = 'New value = ' . $value;
                 }
index e5ee69d..e8a475a 100644 (file)
@@ -27,7 +27,7 @@
                                                        </f:if>
                                                </f:then>
                                                <f:else>
-                                                       <f:if condition="{item.value}">
+                                                       <f:if condition="{item.value} && !{item.hideValue}">
                                                                = {item.value -> f:format.crop(maxCharacters: 40, respectWordBoundaries:0, respectHtml:0)}
                                                        </f:if>
                                                </f:else>
                                                                </div>
                                                        </f:if>
 
+                                                       <f:if condition="{item.type} == 'password'">
+                                                               <div class="form-group">
+                                                                       <span class="help-block">{item.description -> f:format.raw()}</span>
+                                                                       <input
+                                                                                       type="password"
+                                                                                       value="{item.value}"
+                                                                                       data-path="{sectionName}/{item.key}"
+                                                                                       class="t3-install-form-input-text form-control t3js-localConfiguration-pathValue"
+                                                                       />
+                                                               </div>
+                                                       </f:if>
+
                                                        <f:if condition="{item.type} == 'number'">
                                                                <div class="form-group">
                                                                        <span class="help-block">{item.description -> f:format.raw()}</span>