From bbb20ded7ae8ea247593c6341fd40cc91f03b939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20FRAN=C3=87OIS?= Date: Thu, 26 Mar 2020 00:47:43 +0100 Subject: [PATCH] [ADD] sumbit button label in survey_input_template_custom --- survey_input_template_custom/__manifest__.py | 3 ++- survey_input_template_custom/i18n/fr.po | 21 ++++++++++++++++--- .../i18n/survey_input_template_custom.pot | 20 +++++++++++++++--- .../models/survey_survey.py | 2 ++ .../templates/page.xml | 17 +++++++++++++++ .../views/survey_survey.xml | 1 + 6 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 survey_input_template_custom/templates/page.xml diff --git a/survey_input_template_custom/__manifest__.py b/survey_input_template_custom/__manifest__.py index b15bfac..58eab70 100644 --- a/survey_input_template_custom/__manifest__.py +++ b/survey_input_template_custom/__manifest__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Survey input templates custom', + 'name': 'Survey input custom', 'version': '1.0.0', 'summary': """ This module allows to customize the survey start button label and the \"Thank you\" page title. @@ -15,6 +15,7 @@ 'survey', ], 'data': [ + 'templates/page.xml', 'templates/sfinished.xml', 'templates/survey_init.xml', 'views/survey_survey.xml', diff --git a/survey_input_template_custom/i18n/fr.po b/survey_input_template_custom/i18n/fr.po index 3156ced..63d1426 100644 --- a/survey_input_template_custom/i18n/fr.po +++ b/survey_input_template_custom/i18n/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-25 11:41+0000\n" -"PO-Revision-Date: 2020-03-25 11:41+0000\n" +"POT-Creation-Date: 2020-03-25 23:45+0000\n" +"PO-Revision-Date: 2020-03-25 23:45+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -23,7 +23,17 @@ msgstr "Commencer le sondage" #. module: survey_input_template_custom #: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__start_btn_label msgid "Start button label" -msgstr "Label du bouton" +msgstr "Bouton \"Commencer\"" + +#. module: survey_input_template_custom +#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__submit_btn_label +msgid "Submit button label" +msgstr "Bouton \"Soumettre\"" + +#. module: survey_input_template_custom +#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.page +msgid "Submit survey" +msgstr "Soumettre le sondage" #. module: survey_input_template_custom #: model:ir.model,name:survey_input_template_custom.model_survey_survey @@ -45,6 +55,11 @@ msgstr "Merci !" msgid "This label will be used in the survey start button. If empty, the label will be \"Start survey\"." msgstr "Ce label sera utilisé dans le bouton au début du sondage. Si ce champ est vide, le label sera \"Commencer le sondage\"." +#. module: survey_input_template_custom +#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__submit_btn_label +msgid "This label will be used in the survey submit button. If empty, the label will be \"Submit survey\"." +msgstr "Ce label sera utilisé dans le bouton pour soumettre la réponse. Si ce champ est vide, le label sera \"Soumettre le sondage\"." + #. module: survey_input_template_custom #: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__thank_you_title msgid "This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\"." diff --git a/survey_input_template_custom/i18n/survey_input_template_custom.pot b/survey_input_template_custom/i18n/survey_input_template_custom.pot index 1b24765..9a1c118 100644 --- a/survey_input_template_custom/i18n/survey_input_template_custom.pot +++ b/survey_input_template_custom/i18n/survey_input_template_custom.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-25 11:42+0000\n" -"PO-Revision-Date: 2020-03-25 11:42+0000\n" +"POT-Creation-Date: 2020-03-25 23:45+0000\n" +"PO-Revision-Date: 2020-03-25 23:45+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -25,6 +25,16 @@ msgstr "" msgid "Start button label" msgstr "" +#. module: survey_input_template_custom +#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__submit_btn_label +msgid "Submit button label" +msgstr "" + +#. module: survey_input_template_custom +#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.page +msgid "Submit survey" +msgstr "" + #. module: survey_input_template_custom #: model:ir.model,name:survey_input_template_custom.model_survey_survey msgid "Survey" @@ -45,8 +55,12 @@ msgstr "" msgid "This label will be used in the survey start button. If empty, the label will be \"Start survey\"." msgstr "" +#. module: survey_input_template_custom +#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__submit_btn_label +msgid "This label will be used in the survey submit button. If empty, the label will be \"Submit survey\"." +msgstr "" + #. module: survey_input_template_custom #: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__thank_you_title msgid "This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\"." msgstr "" - diff --git a/survey_input_template_custom/models/survey_survey.py b/survey_input_template_custom/models/survey_survey.py index 54d8589..5633230 100644 --- a/survey_input_template_custom/models/survey_survey.py +++ b/survey_input_template_custom/models/survey_survey.py @@ -6,5 +6,7 @@ class SurveySurvey(models.Model): start_btn_label = fields.Char(string="Start button label", help="This label will be used in the survey start button. If empty, the label will be \"Start survey\".") + submit_btn_label = fields.Char(string="Submit button label", + help="This label will be used in the survey submit button. If empty, the label will be \"Submit survey\".") thank_you_title = fields.Char(string="Thank you page title", help="This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\".") diff --git a/survey_input_template_custom/templates/page.xml b/survey_input_template_custom/templates/page.xml new file mode 100644 index 0000000..5ed7433 --- /dev/null +++ b/survey_input_template_custom/templates/page.xml @@ -0,0 +1,17 @@ + + + + + + diff --git a/survey_input_template_custom/views/survey_survey.xml b/survey_input_template_custom/views/survey_survey.xml index fce5293..d132065 100644 --- a/survey_input_template_custom/views/survey_survey.xml +++ b/survey_input_template_custom/views/survey_survey.xml @@ -11,6 +11,7 @@ +