Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace privacy policy (required) confirmation #5885

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions com.woltlab.wcf/templates/contact.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,7 @@
</div>
{/if}

<dl{if $errorField == 'privacyPolicyConfirmed'} class="formError"{/if}>
<dt></dt>
<dd>
<label><input type="checkbox" name="privacyPolicyConfirmed" value="1" {if $privacyPolicyConfirmed}checked="checked" {/if}/> {lang}wcf.contact.confirmPrivacyPolicy{/lang}</label>
{if $errorField == 'privacyPolicyConfirmed'}
<small class="innerError">
{if $errorType == 'empty'}
{lang}wcf.global.form.error.empty{/lang}
{/if}
</small>
{/if}
</dd>
</dl>
<p class="info">{lang}wcf.contact.confirmPrivacyPolicy{/lang}</p>
</section>

{event name='sections'}
Expand Down
14 changes: 0 additions & 14 deletions wcfsetup/install/files/lib/form/ContactForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ class ContactForm extends AbstractCaptchaForm
*/
public $recipientList;

/**
* user has confirmed the privacy policy
* @var bool
*/
public $privacyPolicyConfirmed = 0;

/**
* @var string
*/
Expand Down Expand Up @@ -122,9 +116,6 @@ public function readFormParameters()
if (isset($_POST['recipientID'])) {
$this->recipientID = \intval($_POST['recipientID']);
}
if (!empty($_POST['privacyPolicyConfirmed'])) {
$this->privacyPolicyConfirmed = 1;
}
}

/**
Expand Down Expand Up @@ -175,10 +166,6 @@ public function validate()
throw new UserInputException('recipientID', 'invalid');
}
}

if (!$this->privacyPolicyConfirmed) {
throw new UserInputException('privacyPolicyConfirmed');
}
}

/**
Expand Down Expand Up @@ -242,7 +229,6 @@ public function assignVariables()
'options' => $this->optionHandler->getOptions(),
'recipientList' => $this->recipientList,
'recipientID' => $this->recipientID,
'privacyPolicyConfirmed' => $this->privacyPolicyConfirmed,
'attachmentHandler' => $this->attachmentHandler,
'attachmentObjectID' => 0,
'attachmentObjectType' => $this->attachmentObjectType,
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/lang/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3577,7 +3577,7 @@ Dateianhänge:
<item name="wcf.contact.sender"><![CDATA[Absender]]></item>
<item name="wcf.contact.sender.information"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Angaben]]></item>
<item name="wcf.contact.success"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Deine{else}Ihre{/if} Nachricht wurde erfolgreich versandt.]]></item>
<item name="wcf.contact.confirmPrivacyPolicy"><![CDATA[Ich habe die <a href="{page}com.woltlab.wcf.PrivacyPolicy{/page}">Datenschutzerklärung</a> gelesen und stimme dieser zu. <span class="customOptionRequired">*</span>]]></item>
<item name="wcf.contact.confirmPrivacyPolicy"><![CDATA[Bitte beachte{if !LANGUAGE_USE_INFORMAL_VARIANT}n Sie{/if} unsere <a href="{page}com.woltlab.wcf.PrivacyPolicy{/page}">Datenschutzerklärung</a>.]]></item>
</category>
<category name="wcf.date">
<item name="wcf.date.dateFormat"><![CDATA[j. F Y]]></item>
Expand Down
2 changes: 1 addition & 1 deletion wcfsetup/install/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3503,7 +3503,7 @@ Attachments:
<item name="wcf.contact.sender"><![CDATA[Sender]]></item>
<item name="wcf.contact.sender.information"><![CDATA[Your Data]]></item>
<item name="wcf.contact.success"><![CDATA[Message has been sent.]]></item>
<item name="wcf.contact.confirmPrivacyPolicy"><![CDATA[I have read the <a href="{page}com.woltlab.wcf.PrivacyPolicy{/page}">privacy policy</a> and expressly accept it. <span class="customOptionRequired">*</span>]]></item>
<item name="wcf.contact.confirmPrivacyPolicy"><![CDATA[Please note our <a href="{page}com.woltlab.wcf.PrivacyPolicy{/page}">Privacy Policy</a>.]]></item>
</category>
<category name="wcf.acp.contact">
<item name="wcf.acp.contact.options"><![CDATA[Input Fields]]></item>
Expand Down
Loading