public static function documentation()
    {
        // Fetch all the Email Templates available and add to the end of the documentation
        $templates = extension_Members::fetchEmailTemplates();
        $div = new XMLElement('div');
        if (!empty($templates)) {
            $label = new XMLElement('label', __('Regenerate Activation Code Email Template'));
            $regenerate_activation_code_templates = extension_Members::setActiveTemplate($templates, 'regenerate-activation-code-template');
            $label->appendChild(Widget::Select('members[regenerate-activation-code-template][]', $regenerate_activation_code_templates, array('multiple' => 'multiple')));
            $div->appendChild($label);
            $div->appendChild(Widget::Input('members[event]', 'reset-password', 'hidden'));
            $div->appendChild(Widget::Input(null, __('Save Changes'), 'submit', array('accesskey' => 's')));
        }
        return '
				<p>This event will regenerate an activation code for a user and is useful if their current
				activation code has expired. The activation code can be sent to a Member\'s email after
				this event has executed.</p>
				<h3>Example Front-end Form Markup</h3>
				<p>This is an example of the form markup you can use on your front end. An input field
				accepts either the member\'s email address or username.</p>
				<pre class="XML"><code>
				&lt;form method="post"&gt;
					&lt;label&gt;Username: &lt;input name="fields[username]" type="text" value="{$username}"/&gt;&lt;/label&gt;
					or
					&lt;label&gt;Email: &lt;input name="fields[email]" type="text" value="{$email}"/&gt;&lt;/label&gt;
					&lt;input type="submit" name="action[' . self::ROOTELEMENT . ']" value="Regenerate Activation Code"/&gt;
					&lt;input type="hidden" name="redirect" value="{$root}/"/&gt;
				&lt;/form&gt;
				</code></pre>
				<h3>More Information</h3>
				<p>For further information about this event, including response and error XML, please refer to the
				<a href="https://github.com/symphonycms/members/wiki/Members%3A-Regenerate-Activation-Code">wiki</a>.</p>
				' . $div->generate() . '
			';
    }
    public static function documentation()
    {
        // Fetch all the Email Templates available and add to the end of the documentation
        $templates = extension_Members::fetchEmailTemplates();
        $div = new XMLElement('div');
        if (!empty($templates)) {
            //Template
            $label = new XMLElement('label', __('Reset Password Email Template'));
            $reset_password_templates = extension_Members::setActiveTemplate($templates, 'reset-password-template');
            $label->appendChild(Widget::Select('members[reset-password-template][]', $reset_password_templates, array('multiple' => 'multiple')));
            $div->appendChild($label);
        }
        // Auto Login
        $div->appendChild(Widget::Input("members[auto-login]", 'no', 'hidden'));
        $label = new XMLElement('label');
        $input = Widget::Input("members[auto-login]", 'yes', 'checkbox');
        if (extension_Members::getSetting('reset-password-auto-login') == 'yes') {
            $input->setAttribute('checked', 'checked');
        }
        $label->setValue(__('%s Automatically log the member in after changing their password', array($input->generate())));
        $div->appendChild($label);
        $div->appendChild(Widget::Input('members[event]', 'reset-password', 'hidden'));
        $div->appendChild(Widget::Input('action[save]', __('Save Changes'), 'submit', array('accesskey' => 's')));
        return '
				<p>This event requires the user to enter their recovery code and then their new password. Should the recovery code
				be correct and the new password validate, the member\'s password will be changed to their new password.</p><p>
				A recovery code is available by including the
				Member: Password field in a data source on the same page as this event, or by using
				the event\'s result.</p>
				<h3>Example Front-end Form Markup</h3>
				<p>This is an example of the form markup you can use on your front end. An input field
				accepts the member\'s recovery code, either the member\'s email address or username and two password
				fields (one for password, one to confirm) will allow the member to change their password.</p>
				<pre class="XML"><code>
				&lt;form method="post"&gt;
					&lt;label&gt;Username: &lt;input name="fields[username]" type="text" value="{$username}"/&gt;&lt;/label&gt;
					or
					&lt;label&gt;Email: &lt;input name="fields[email]" type="text" value="{$email}"/&gt;&lt;/label&gt;
					&lt;label&gt;Recovery Code: &lt;input name="fields[password][recovery-code]" type="text" value="{$code}"/&gt;&lt;/label&gt;
					&lt;label&gt;Password: &lt;input name="fields[password][password]" type="password" /&gt;&lt;/label&gt;
					&lt;label&gt;Confirm Password: &lt;input name="fields[password][confirm]" type="password" /&gt;&lt;/label&gt;
					&lt;input type="hidden" name="members-section-id" value="{$your-section-id}"/&gt;
					&lt;input type="submit" name="action[' . self::ROOTELEMENT . ']" value="Recover Account"/&gt;
					&lt;input type="hidden" name="redirect" value="{$root}/"/&gt;
				&lt;/form&gt;
				</code></pre>
				<h3>More Information</h3>
				<p>For further information about this event, including response and error XML, please refer to the
				<a href="https://github.com/symphonycms/members/wiki/Members%3A-Reset-Password">wiki</a>.</p>
				' . $div->generate() . '
			';
    }
    public static function documentation()
    {
        // Fetch all the Email Templates available and add to the end of the documentation
        $templates = extension_Members::fetchEmailTemplates();
        $div = new XMLElement('div');
        if (!empty($templates)) {
            // Template
            $label = new XMLElement('label', __('Activate Account Email Template'));
            $activate_account_templates = extension_Members::setActiveTemplate($templates, 'activate-account-template');
            $label->appendChild(Widget::Select('members[activate-account-template][]', $activate_account_templates, array('multiple' => 'multiple')));
            $div->appendChild($label);
        }
        // Auto Login
        $div->appendChild(Widget::Input("members[auto-login]", 'no', 'hidden'));
        $label = new XMLElement('label');
        $input = Widget::Input("members[auto-login]", 'yes', 'checkbox');
        if (extension_Members::getSetting('activate-account-auto-login') == 'yes') {
            $input->setAttribute('checked', 'checked');
        }
        $label->setValue(__('%s Automatically log the member in after activation', array($input->generate())));
        $div->appendChild($label);
        // Add Save Changes
        $div->appendChild(Widget::Input('members[event]', 'activate-account', 'hidden'));
        $div->appendChild(Widget::Input('action[save]', __('Save Changes'), 'submit', array('accesskey' => 's')));
        return '
				<p>This event takes an activation code and an identifier for the Member (either Email or Username) to activate their account.
				An activation code is available by including the Members: Activation field in a data source on the same page as this event, or by using
				the event\'s result.</p>
				<h3>Example Front-end Form Markup</h3>
				<p>This is an example of the form markup you can use on your front end. An input field
				accepts the member\'s activation code and either the member\'s email address or username.</p>
				<pre class="XML"><code>
				&lt;form method="post"&gt;
					&lt;label&gt;Username: &lt;input name="fields[username]" type="text" value="{$username}"/&gt;&lt;/label&gt;
					or
					&lt;label&gt;Email: &lt;input name="fields[email]" type="text" value="{$email}"/&gt;&lt;/label&gt;
					&lt;label&gt;Activation: &lt;input name="fields[activation]" type="text" value="{$code}"/&gt;&lt;/label&gt;
					&lt;input type="hidden" name="members-section-id" value="{$your-section-id}"/&gt;
					&lt;input type="submit" name="action[' . self::ROOTELEMENT . ']" value="Activate Account"/&gt;
					&lt;input type="hidden" name="redirect" value="{$root}/"/&gt;
				&lt;/form&gt;
				</code></pre>
				<h3>More Information</h3>
				<p>For further information about this event, including response and error XML, please refer to the
				<a href="https://github.com/symphonycms/members/wiki/Members%3A-Activate-Account">wiki</a>.</p>
				' . $div->generate() . '
			';
    }
    public static function documentation()
    {
        // Fetch all the Email Templates available and add to the end of the documentation
        $templates = extension_Members::fetchEmailTemplates();
        $div = new XMLElement('div');
        if (!empty($templates)) {
            $label = new XMLElement('label', __('Generate Recovery Code Email Template'));
            $generate_recovery_code_templates = extension_Members::setActiveTemplate($templates, 'generate-recovery-code-template');
            $label->appendChild(Widget::Select('members[generate-recovery-code-template][]', $generate_recovery_code_templates, array('multiple' => 'multiple')));
            $div->appendChild($label);
            $div->appendChild(Widget::Input('members[event]', 'generate-recovery-code', 'hidden'));
            $div->appendChild(Widget::Input('action[save]', __('Save Changes'), 'submit', array('accesskey' => 's')));
        }
        return '
				<p>This event takes a member\'s email address or username to validate the existence of the Member before
				generating a recovery code for that member. A member\'s password is not completely reset until their 
				recovery code is used in the Members: Reset Password event. This recovery code can be seen
				by including the Member: Password field in a data source on the same page as this event, or by using
				the event\'s result.</p>
				<h3>Example Front-end Form Markup</h3>
				<p>This is an example of the markup you can use on your front end to create a form for this event. An input field
				accepts either the member\'s email address or username.</p>
				<pre class="XML"><code>
				&lt;form method="post"&gt;
					&lt;label&gt;Username: &lt;input name="fields[username]" type="text" value="{$username}"/&gt;&lt;/label&gt;
					or
					&lt;label&gt;Email: &lt;input name="fields[email]" type="text" value="{$email}"/&gt;&lt;/label&gt;
					&lt;input type="hidden" name="members-section-id" value="{$your-section-id}"/&gt;
					&lt;input type="submit" name="action[' . self::ROOTELEMENT . ']" value="Reset Password"/&gt;
					&lt;input type="hidden" name="redirect" value="{$root}/"/&gt;
				&lt;/form&gt;
				</code></pre>
				<h3>More Information</h3>
				<p>For further information about this event, including response and error XML, please refer to the
				<a href="https://github.com/symphonycms/members/wiki/Members%3A-Generate-Recovery-Code">wiki</a>.</p>
				' . $div->generate() . '
			';
    }