Add email template documentation

This commit is contained in:
Aurelsicoko 2018-01-26 18:04:39 +01:00
parent 2493b8c3ac
commit ae9272925c
4 changed files with 19 additions and 5 deletions

View File

@ -156,3 +156,7 @@ $.ajax({
}
});
```
## Email templates
[See the documentation on GitHub](https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/docs/email-templates.md)

View File

@ -173,7 +173,7 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st
label={`users-permissions.PopUpForm.Email.${value}.label`}
name={`${dataToEdit}.${value}`}
inputDescription={includes(value, 'object') ? 'users-permissions.PopUpForm.Email.email_templates.inputDescription' : ''}
linkContent={includes(value, 'object') ? { link: 'https://strapi.io/documentation/plugin-development/ui-components.html', description: 'users-permissions.PopUpForm.Email.link.documentation' } : {}}
linkContent={includes(value, 'object') ? { link: 'https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/docs/email-templates.md', description: 'users-permissions.PopUpForm.Email.link.documentation' } : {}}
onChange={this.props.onChange}
placeholder={`users-permissions.PopUpForm.Email.${this.props.dataToEdit}.${value}.placeholder`}
type={includes(value, 'object') ? 'text' : 'textarea'}

View File

@ -1,3 +0,0 @@
# Templating emails
Documentation in progress....

View File

@ -0,0 +1,13 @@
# Templating emails
By default, this plugin comes with only one template (reset password) for the moment. More templates will come later. The templates use Lodash' template() method to populate the variables.
### Reset Password
- `USER` (object)
- `username`
- `email`
- ...and every other fields that you added manually in the model.
- `TOKEN` corresponds to the token generated to be able to reset the password.
- `URL` is the link where the user will be redirected after clicking on it in the email.