[BUGFIX] Honour TS setup delete = 0 14/56514/2
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 2 Apr 2018 20:56:08 +0000 (16:56 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 2 Apr 2018 20:59:45 +0000 (22:59 +0200)
When delete = 0 is set in TS setup,the ability to delete the account
should not be displayed. Add subpart marker ###SUB_LINK_TO_DELETE###
in order to remove the link in such case.

Resolves: #84076
Change-Id: Ia5a729ca4bf24ac80e03984be0a514606b308ec0
Reviewed-on: https://review.typo3.org/56514
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Classes/View/EditView.php
Resources/Private/Templates/RegisterHtmlTemplate.html

index 5313706..491bfb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2018-04-02 Stanislas Rolland  <typo3(arobas)sjbr.ca>
+       * Resolves #84076: Honour TS setup delete = 0
+
 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
index 914cec4..b933bc6 100644 (file)
@@ -67,6 +67,9 @@ class EditView extends AbstractView
                if (!$this->conf['linkToPID'] || !$this->conf['linkToPIDAddButton'] || !$isPreview) {
                        $templateCode = $this->marker->substituteSubpart($templateCode, '###SUB_LINKTOPID_ADD_BUTTON###', '');
                }
+               if (!$this->conf['delete']) {
+                       $templateCode = $this->marker->substituteSubpart($templateCode, '###SUB_LINK_TO_DELETE###', '');
+               }
                $infoFields = $this->data->getFieldList();
                $requiredFields = $this->data->getRequiredFieldsArray($cmdKey);
                $this->marker->addPasswordTransmissionMarkers($this->getUsePassword(), $this->getUsePasswordAgain());
index ddb1f6b..e7676b7 100644 (file)
@@ -1354,7 +1354,9 @@ The user is informed that a message has been sent to the email address and that
 <fieldset>\r
 <legend>###LABEL_V_DEAR###<br />###LABEL_V_EDIT_YOUR_ACCOUNT###</legend>\r
        <p class="tx-srfeuserregister-pi1-notice">###LABEL_REQUIRED_INFO_NOTICE###</p>\r
+       <!-- ###SUB_LINK_TO_DELETE### -->\r
        <p class="tx-srfeuserregister-pi1-trash"><a href="###DELETE_URL###" title="###LABEL_TOOLTIP_CLICK_HERE_TO_DELETE###">###LABEL_CLICK_HERE_TO_DELETE###</a></p>\r
+       <!-- ###SUB_LINK_TO_DELETE### -->\r
 <dl>\r
        <!-- ###SUB_INCLUDED_FIELD_password### -->\r
        <dt>\r