visualbuilder / email-templates

Email Template Editor for Filament
GNU General Public License v3.0
74 stars 19 forks source link

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

Closed abdosaeedelhassan closed 2 months ago

abdosaeedelhassan commented 2 months ago

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 commented 2 months ago

Thanks for the update

cannycookie commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.