diff --git a/static/src/css/ethikis_survey.css b/static/src/css/ethikis_survey.css index cdbd2226f7fdac60375648ddb63ef5089e566e79..848636e4cf8ce6847b928ba7cc404c38cfd2a8a8 100644 --- a/static/src/css/ethikis_survey.css +++ b/static/src/css/ethikis_survey.css @@ -2,19 +2,15 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ .ethikis-flag{ - width: 25px; + width: 5%; margin: 5px; } .ethikis-survey { font-family: 'Montserrat', sans-serif; + max-width: 900px; padding: 20px; - 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; + margin: 10px auto; } .ethikis-survey h1, .ethikis-survey h2, .ethikis-survey h3, .ethikis-survey h4 { font-weight: 700; @@ -57,10 +53,23 @@ 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 { @@ -108,12 +117,10 @@ 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 a57ba4e89179e189327899fadbd74cbf41b30e40..d86b217cc6caf777557f44578b6505c048649657 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> + <body class="ethikis-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,29 +137,25 @@ <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" /> - <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> + <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> - </div> - <div class="text-right mt16 mb16 mr32"> + </t> + <div class="text-right mt16 mb16"> <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>