odoo/addons/website_mass_mailing/views/unsubscribe_templates.xml

72 lines
2.9 KiB
XML
Raw Permalink Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="unsubscribe">
<div class="container o_unsubscribe_form">
<div class="row">
<form action="/mail/mailing/unsubscribe" method="POST" id="unsubscribe_form">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<input type="hidden" name="email" t-att-value="email"/>
<input type="hidden" name="mailing_id" t-att-value="mailing_id"/>
<div class="col-md-6 col-md-offset-3">
<h1 class="page-header">Mailing Subscriptions</h1>
<t t-if="contacts">
<div class="alert alert-info text-center">
<p>Choose your mailing subscriptions.</p>
</div>
<ul class="list-group">
<t t-foreach="contacts" t-as="contact">
<li class="list-group-item">
<input type="checkbox" class="mail_list_checkbox" name="contact_ids"
t-att-value="contact['id']" t-att-checked="'checked' if contact['opt_out'] == False else None"/>
<t t-esc="contact.list_id.name"/>
</li>
</t>
</ul>
<div class="text-center mb16">
<input type="submit" id="send_form" class="btn btn-primary" value="Update my subscriptions"/>
</div>
</t>
<t t-if="contacts == False">
<div class="alert alert-info text-center">
<p>You are not subscribed to any of our mailing list.</p>
</div>
</t>
</div>
</form>
</div>
</div>
</template>
<template id="unsubscribed">
<div class="container mt8">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1 class="page-header">Mailing Subscriptions</h1>
<div class="alert alert-success text-center">
<p>Your changes have been saved.</p>
</div>
</div>
</div>
</div>
</template>
<template id="page_unsubscribe" name="Unsubscribe">
<t t-call="website.layout">
<t t-call="website_mass_mailing.unsubscribe"/>
</t>
</template>
<template id="page_unsubscribed" name="Unsubscribed">
<t t-call="website.layout">
<t t-call="website_mass_mailing.unsubscribed"/>
</t>
</template>
</odoo>