From 826ddc8d46d835e9193bd2a7c35927f69a25fee5 Mon Sep 17 00:00:00 2001 From: jordan <jordan@le-filament.com> Date: Tue, 28 Jul 2020 18:45:26 +0200 Subject: [PATCH] [] --- static/src/css/ethikis_survey.css | 25 +++++++----------- templates/layout.xml | 44 +++++++++++++++++-------------- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/static/src/css/ethikis_survey.css b/static/src/css/ethikis_survey.css index 848636e..cdbd222 100644 --- a/static/src/css/ethikis_survey.css +++ b/static/src/css/ethikis_survey.css @@ -2,15 +2,19 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ .ethikis-flag{ - width: 5%; + width: 25px; margin: 5px; } .ethikis-survey { font-family: 'Montserrat', sans-serif; - max-width: 900px; padding: 20px; - margin: 10px auto; + background-image: url('/ethikis_survey/static/src/css/background.jpg'); + background-repeat: no-repeat; + background-size: cover; + background-blend-mode: luminosity; + background-color: white; + color:#3D3D3D; } .ethikis-survey h1, .ethikis-survey h2, .ethikis-survey h3, .ethikis-survey h4 { font-weight: 700; @@ -53,23 +57,10 @@ text-decoration: none; } -.ethikis-body { - background-image: url('/ethikis_survey/static/src/css/background.jpg'); - background-repeat: no-repeat; - background-size: cover; - background-blend-mode: luminosity; - color:#3D3D3D; -} - -.ethikis-body main { - padding-bottom: 150px; -} - .ethikis-footer { background-color: #3D3D3D; bottom: 0; width: 100%; - position: fixed; } .fa { @@ -117,10 +108,12 @@ background-color: #61C4E1; color: white; border-radius: 20px; + text-transform: uppercase; } .ethikis-btn-green { background-color: #009036; color: white; border-radius: 20px; + text-transform: uppercase; } \ No newline at end of file diff --git a/templates/layout.xml b/templates/layout.xml index d86b217..a57ba4e 100644 --- a/templates/layout.xml +++ b/templates/layout.xml @@ -7,7 +7,7 @@ <!-- remplace le body pour supprimer le header et ajouter le footer --> <xpath expr="//body" position="replace"> - <body class="ethikis-body"> + <body> <header> </header> <main class="ethikis-survey"> @@ -122,7 +122,7 @@ </xpath> </template> - + <!-- SURVEY PAGE --> <template id="ethikis_survey_page" inherit_id="survey.page"> <xpath expr="//div[@class='o_page_header']" position="replace"> @@ -137,25 +137,29 @@ <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> <input type="hidden" name="page_id" t-att-value="page.id" /> <input type="hidden" name="token" t-att-value="token" /> - <t t-foreach='page.question_ids' t-as='question'> - <t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" /> - <div class="js_question-wrapper" t-att-id="prefix"> - <h4> - <span t-field='question.question' /> - <span t-if="question.constr_mandatory" class="text-danger">*</span> - </h4> - <div t-field='question.description' class="text-muted oe_no_empty"/> - <t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t> - <t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t> - <t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t> - <t t-if="question.type == 'date'"><t t-call="survey.date"/></t> - <t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t> - <t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t> - <t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t> - <div class="js_errzone alert alert-danger" style="display:none;" role="alert"/> + <div class="row"> + <div class="col-9"> + <t t-foreach='page.question_ids' t-as='question'> + <t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" /> + <div class="js_question-wrapper" t-att-id="prefix"> + <h4> + <span t-field='question.question' /> + <span t-if="question.constr_mandatory" class="text-danger">*</span> + </h4> + <div t-field='question.description' class="text-muted oe_no_empty"/> + <t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t> + <t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t> + <t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t> + <t t-if="question.type == 'date'"><t t-call="survey.date"/></t> + <t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t> + <t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t> + <t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t> + <div class="js_errzone alert alert-danger" style="display:none;" role="alert"/> + </div> + </t> </div> - </t> - <div class="text-right mt16 mb16"> + </div> + <div class="text-right mt16 mb16 mr32"> <button t-if="survey.users_can_go_back and page_nr > 0" type="submit" class="btn ethikis-btn-green" name="button_submit" value="previous">Previous page</button> <button t-if="not last" type="submit" class="btn ethikis-btn-blue" name="button_submit" value="next">Save or continue</button> <button t-if="last" type="submit" class="btn ethikis-btn-blue" name="button_submit" value="finish">Submit survey</button> -- GitLab