diff --git a/docs/3.x.x/en/guides/authentication.md b/docs/3.x.x/en/guides/authentication.md index 51566a8adc..2cadab6466 100644 --- a/docs/3.x.x/en/guides/authentication.md +++ b/docs/3.x.x/en/guides/authentication.md @@ -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) diff --git a/packages/strapi-plugin-users-permissions/admin/src/components/PopUpForm/index.js b/packages/strapi-plugin-users-permissions/admin/src/components/PopUpForm/index.js index a30b99b059..f0a277e6e9 100644 --- a/packages/strapi-plugin-users-permissions/admin/src/components/PopUpForm/index.js +++ b/packages/strapi-plugin-users-permissions/admin/src/components/PopUpForm/index.js @@ -110,7 +110,7 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st validations={{}} value={get(this.props.values, 'enabled', this.state.enabled)} /> - + {form.length > 1 &&
} {map(tail(form), (value, key) => ( @@ -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'} diff --git a/packages/strapi-plugin-users-permissions/doc/email-templates.md b/packages/strapi-plugin-users-permissions/doc/email-templates.md deleted file mode 100644 index cb040f5cfa..0000000000 --- a/packages/strapi-plugin-users-permissions/doc/email-templates.md +++ /dev/null @@ -1,3 +0,0 @@ -# Templating emails - -Documentation in progress.... diff --git a/packages/strapi-plugin-users-permissions/docs/email-templates.md b/packages/strapi-plugin-users-permissions/docs/email-templates.md new file mode 100644 index 0000000000..5d7d0edd4e --- /dev/null +++ b/packages/strapi-plugin-users-permissions/docs/email-templates.md @@ -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.