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

Feature/restore reply to and validation #8

Merged
merged 10 commits into from
Feb 15, 2023

Conversation

handcode
Copy link
Member

@handcode handcode commented Feb 15, 2023

Background:

  • In bd20d10 and ff. the feature to set reply-to header from form value (via schema property name 'reply_to') was "removed.
  • a "new" property reply_to_email was added to the template, which - if set - is used as a "fixed" reply-to for all sended mails. This can be useful, but is not a generic solution to set the reply-to header.
  • the optional property to set the return-path header (for bounce mails) was also removed
  • During the refactoring, unfortunately, also the validation of the mail addresses when editing the templates and before sending the mails are lost.

This PR:

  • restores the optional feature to get reply-to from schema property. The fixed reply_to_email address - if set - has priority.
  • restores the optional feature to set a return-path address
  • re-add email-validations while editing templates and before sending the mails
  • and while we are at it, the backend GUI has been improved as well (relation links, better formatting,...)

As we need these "features" also in "older" projects, this PR should be merged in the release/2.0.x branch first, and must then be ported to the 3.* and master branches.

@handcode handcode requested a review from eluhr February 15, 2023 08:47
public function safeUp()
{

$this->addColumn('app_dmstr_contact_template','return_path', $this->string()->null()->defaultValue(null)->after('to_email'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use {{%dmstr_contact_template}} instead of specifying the prefix directly. This could lead to potential side-effects

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function safeUp()
{

$this->addColumn('app_dmstr_contact_template','reply_to_schema_property', $this->string()->null()->defaultValue(null)->after('return_path'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use {{%dmstr_contact_template}} instead of specifying the prefix directly. This could lead to potential side-effects

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above.


<div class="container text-center">
<div class="row">
<div class=" col-xs-12 alert alert-success">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use an extra div for the alert. Horizontal padding could lead to shifting layout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, will change

@handcode handcode merged commit 80d016b into release/2.0.x Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants