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

Change template key to be selectable list from config file #17

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

abdosaeedelhassan
Copy link
Contributor

This change to prevent template key to be changed by end user because template key is unique and used inside code for sending mail, after this change all project email templates well be setting in config file

@cannycookie cannycookie merged commit c96bc2d into visualbuilder:3.x Sep 22, 2024
2 checks passed
@cannycookie
Copy link
Collaborator

Thanks for the update

@cannycookie
Copy link
Collaborator

The translation is fine, but forcing the key to a be select means that when users add new templates the config file will need updating. This is not really practical in every day usage.

@abdosaeedelhassan
Copy link
Contributor Author

The translation is fine, but forcing the key to a be select means that when users add new templates the config file will need updating. This is not really practical in every day usage.

Yes, adding new template need to create new template class to be used inside code, also the programmer who's control using mail template and the end user just config the template content, i will ask you question to understand what i mean, if the end user create new template, how this temple work inside project without additional code

@cannycookie
Copy link
Collaborator

You're right, generally code is required to use a template - but I do have cases where we dynamically select the email template and the classes are created automatically so it's not 100% true. Having the select means that a developer must first edit a config file for a user to be able to add a new template.

If you want to do this suggest just using your own resource -> you can extend the package resource or just create your own.

Good luck!

@abdosaeedelhassan
Copy link
Contributor Author

You're right, generally code is required to use a template - but I do have cases where we dynamically select the email template and the classes are created automatically so it's not 100% true. Having the select means that a developer must first edit a config file for a user to be able to add a new template.

If you want to do this suggest just using your own resource -> you can extend the package resource or just create your own.

Good luck!

Can i contribute add config option to the template key field to be my default as TextInput as what exists now or can be changed to select list from configuration.

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