Skip to content

Commit

Permalink
Merge 46ffc95 into 0c5e0bf
Browse files Browse the repository at this point in the history
  • Loading branch information
yajo committed Nov 12, 2015
2 parents 0c5e0bf + 46ffc95 commit 8abc34a
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 0 deletions.
59 changes: 59 additions & 0 deletions website_snippet_contact_form/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

====================
Contact Form Snippet
====================

This module was written to extend the functionality of contact form to embed it
in a snippet and allow you to put it in any page you want.

Usage
=====

To use this module, you need to:

* Go to your website and edit any page.
* Go to *Insert Blocks > Content*.
* Drag *Contact Form* anywhere.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/186/8.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/website/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
website/issues/new?body=module:%20
website_crm_snippet%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Contributors
------------

* Rafael Blasco <rafaelbn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.
Empty file.
20 changes: 20 additions & 0 deletions website_snippet_contact_form/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Contact Form Snippet",
"summary": "Put a contact form anywhere you want",
"version": "8.0.1.0.0",
"category": "Uncategorized",
"website": "https://odoo-community.org/",
"author": "Antiun Ingeniería, S.L., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"website_crm_privacy_policy",
],
"data": [
"views/snippets.xml",
],
}
63 changes: 63 additions & 0 deletions website_snippet_contact_form/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_crm_snippet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-11 18:42+0100\n"
"PO-Revision-Date: 2015-11-11 18:43+0100\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.5\n"
"Last-Translator: \n"
"Language: es\n"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Contact Form"
msgstr "Formulario de contacto"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Email"
msgstr "Correo electrónico"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Phone Number"
msgstr "Teléfono"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Send"
msgstr "Enviar"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Subject"
msgstr "Asunto"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Tell us something!"
msgstr "¡Díganos algo!"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Your Company"
msgstr "Su empresa"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Your Name"
msgstr "Su nombre"

#. module: website_crm_snippet
#: view:website:website.snippets
msgid "Your Question"
msgstr "Su pregunta"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 137 additions & 0 deletions website_snippet_contact_form/views/snippets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Antiun Ingeniería, S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->

<openerp>
<data>

<template id="snippet"
inherit_id="website.snippets"
name="Contact Form">
<xpath expr="//div[@id='snippet_content']">
<div>
<div class="oe_snippet_thumbnail">
<img src="/website_crm_snippet/static/description/icon.png"
class="oe_snippet_thumbnail_img"/>
<span class="oe_snippet_thumbnail_title">
Contact Form
</span>
</div>

<form action="/crm/contactus"
method="post"
class="form-horizontal mt32 oe_snippet_body website_crm_snippet col-md-12"
enctype="multipart/form-data">

<div class="col-md-12 text-center">
<h2>Contact Form</h2>
<h3 class="text-muted">Tell us something!</h3>
</div>

<div class="form-group col-md-12">
<label class="col-sm-4 control-label"
for="contact_name">
Your Name
</label>
<div class="col-sm-8">
<input class="form-control"
name="contact_name"
required="required"
type="text"/>
</div>
</div>

<div class="form-group col-md-12">
<label class="col-sm-4 control-label" for="phone">
Phone Number
</label>
<div class="col-sm-8">
<input class="form-control"
name="phone"
type="text"/>
</div>
</div>

<div name="email_from_container" class="form-group col-md-12">
<label class="col-sm-4 control-label"
for="email_from">
Email
</label>
<div class="col-sm-8">
<input class="form-control"
name="email_from"
required="required"
type="email"/>
</div>
</div>

<div class="form-group col-md-12">
<label class="col-sm-4 control-label"
for="partner_name">
Your Company
</label>
<div class="col-sm-8">
<input class="form-control"
name="partner_name"
required="required"
type="text"/>
</div>
</div>

<div class="form-group col-md-12">
<label class="col-sm-4 control-label" for="name">
Subject
</label>
<div class="col-sm-8">
<input class="form-control"
name="name"
required="required"
type="text"/>
</div>
</div>

<div class="form-group col-md-12">
<label class="col-sm-4 control-label"
for="description">
Your Question
</label>
<div class="col-sm-8">
<textarea class="form-control"
name="description"
required="required"></textarea>
</div>
</div>

<div class="form-group col-md-12">
<label class="col-md-3 col-sm-4 control-label" for="terms"></label>
<div class="col-md-7 col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox"
name="privacy_policy"
required="True"/>
I have read and accept the
<a href="/page/privacy"
target="_blank"
title="Privacy Policy"
>Privacy Policy</a>.
</label>
</div>
</div>
</div>

<div class="form-group col-md-12">
<div class="col-sm-offset-4 col-sm-8">
<button class="btn btn-primary btn-lg"
type="submit">
Send
</button>
</div>
</div>
</form>
</div>
</xpath>
</template>

</data>
</openerp>

0 comments on commit 8abc34a

Please sign in to comment.