<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="mail_template_user_input_invite" model="mail.template">
        <field name="name">Survey: Invite</field>
        <field name="model_id" ref="survey.model_survey_user_input" />
        <field name="subject">Participate to ${object.survey_id.title} survey</field>
        <field
            name="email_to"
        >${(object.partner_id.email_formatted or object.email) |safe}</field>
        <field name="body_html" type="html">
            <div style="margin: 0px; padding: 0px; font-size: 13px;">
                <p style="margin: 0px; padding: 0px; font-size: 13px;">
        Dear ${object.partner_id.name or 'participant'}<br /><br />
        % if object.survey_id.certificate:
            You have been invited to take a new certification.
        % else:
            We are conducting a survey and your response would be appreciated.
        % endif
        <div style="margin: 16px 0px 16px 0px;">
                        <a
                            href="${('%s?answer_token=%s' % (object.survey_id.public_url, object.access_token)) | safe}"
                            style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;"
                        >
                % if object.survey_id.certificate:
                    Start Certification
                % else:
                    Start Survey
                % endif
            </a>
                    </div>
        % if object.deadline:
            Please answer the survey for ${format_date(object.deadline)}.<br /><br />
        % endif
        Thank you for your participation.
    </p>
            </div>
        </field>
        <field name="lang">${object.partner_id.lang}</field>
        <field name="auto_delete" eval="True" />
    </record>
</odoo>
