diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/survey/views/survey_templates_management.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/survey/views/survey_templates_management.xml')
| -rw-r--r-- | addons/survey/views/survey_templates_management.xml | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/addons/survey/views/survey_templates_management.xml b/addons/survey/views/survey_templates_management.xml new file mode 100644 index 00000000..4612b6c0 --- /dev/null +++ b/addons/survey/views/survey_templates_management.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo><data> + + <!-- ============================================================ --> + <!-- Errors / Corner case management --> + <!-- ============================================================ --> + + <!-- Forbidden error messages--> + <template id="survey_403_page" name="Survey: custom 403 page"> + <t t-call="survey.layout"> + <div id="wrap"> + <div class="container"> + <h1 class="mt32">403: Forbidden</h1> + <p>The page you were looking for could not be authorized.</p> + <p>Maybe you were looking for + <a t-attf-href="/web#view_type=form&model=survey.survey&id=#{survey.id}&action=survey.action_survey_form">this page</a> ? + </p> + </div> + </div> + </t> + </template> + + <!-- Error: void survey --> + <template id="survey_void_content" name="Survey: void content"> + <t t-call="survey.layout"> + <t t-if="answer.test_entry" t-call="survey.survey_button_form_view" /> + <div class="wrap"> + <div class="container"> + <div class="jumbotron mt32"> + <h1><span t-field="survey.title"/> survey is void</h1> + <p>Please make sure you have at least one question in your survey. You also need at least one section if you chose the "Page per section" layout.<br /> + <a t-att-href="'/web#view_type=form&model=survey.survey&id=%s&action=survey.action_survey_form' % survey.id" + class="btn btn-secondary" + groups="survey.group_survey_manager">Edit in backend</a> + </p> + </div> + </div> + </div> + </t> + </template> + + <!-- Error: auth required --> + <template id="survey_auth_required" name="Survey: login required"> + <t t-call="survey.layout"> + <div class="wrap"> + <div class="container"> + <div class="jumbotron mt32"> + <h1>Login required</h1> + <p>This survey is open only to registered people. Please + <a t-att-href="redirect_url">log in</a>. + </p> + </div> + </div> + </div> + </t> + </template> + + <!-- Expired (closed) survey page --> + <template id="survey_closed_expired" name="Survey: expired"> + <t t-call="survey.layout"> + <div class="wrap"> + <div class="container"> + <div class="jumbotron mt32"> + <h1><span t-field="survey.title"/> survey expired</h1> + <p>This survey is now closed. Thank you for your interest !</p> + </div> + </div> + </div> + </t> + </template> + + <!-- ============================================================ --> + <!-- Tools / Utilities --> + <!-- ============================================================ --> + + <template id="survey_button_form_view" name="Survey: back to form view"> + <div groups="survey.group_survey_manager" t-ignore="true" class="alert alert-info alert-dismissible rounded-0 fade show d-print-none css_editable_mode_hidden mb-0"> + <div t-ignore="true" class="text-center"> + <a t-attf-href="/web#view_type=form&model=survey.survey&id=#{survey.id}&action=survey.action_survey_form"><i class="fa fa-fw fa-arrow-right"/><span t-if="answer and answer.test_entry">This is a test survey. </span>Edit Survey</a> + </div> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> × </button> + </div> + </template> + + <template id="survey_button_retake" name="Survey: retake button"> + <div> + <t t-if="not answer.scoring_success and not answer.is_session_answer"> + <t t-if="survey.is_attempts_limited"> + <t t-set="attempts_left" t-value="survey._get_number_of_attempts_lefts(answer.partner_id, answer.email, answer.invite_token)" /> + <t t-if="attempts_left > 0"> + <p><span>Number of attemps left</span>: <span t-esc="attempts_left"></span></p> + <p><a role="button" class="btn btn-primary btn-lg" t-att-href="'/survey/retry/%s/%s' % (survey.access_token, answer.access_token)"> + Retry</a></p> + </t> + </t> + <t t-else=""> + <p><a role="button" class="btn btn-primary btn-lg" t-att-href="'/survey/retry/%s/%s' % (survey.access_token, answer.access_token)"> + Retry</a></p> + </t> + </t> + </div> + </template> + + <!-- Survey Home page - Session Code + Used in 'session mode' to give an easy access to the survey through the '/s' route. --> + <template id="survey_session_code" name="Survey: Access Code page"> + <t t-call="survey.layout"> + <div class="wrap o_survey_wrap pb16 d-flex"> + <div class="container o_survey_quick_access d-flex flex-column"> + <div class="d-flex flex-grow-1 align-items-center"> + <div class="col-lg-12"> + <div class="text-center mb32"> + <h3>Please enter the code</h3> + </div> + <div class="row"> + <div class="offset-md-4 col-md-4 text-center"> + <input id="session_code" type="text" placeholder="4812" + class="form-control o_survey_question_text_box font-weight-bold bg-transparent text-primary text-center rounded-0 p-2 w-100"/> + </div> + <div class="col-3 text-center o_survey_error text-danger d-none pt-2" role="alert"> + <span>Code is incorrect. Please try again.</span> + </div> + </div> + <div class="text-center mt32 p-2"> + <button type="submit" class="btn btn-primary">Submit</button> + </div> + <div class="text-center p-2"> + <span class="text-muted">The code is found on the screen in front of you</span> + </div> + </div> + </div> + </div> + </div> + </t> + </template> + + <template id="survey_navigation" name="Survey: Navigation"> + <button t-if="can_go_back" + type="submit" class="btn p-0 shadow-none o_survey_navigation_submit" name="button_submit" value="previous" t-att-data-previous-page-id="previous_page_id"> + <i class="border-left fa fa-chevron-left p-2" /> + </button> + <button t-if="survey and survey.questions_layout in ['page_per_question', 'page_per_section'] and answer and answer.state != 'done' and not answer.is_session_answer" + type="submit" class="btn p-0 shadow-none o_survey_navigation_submit" t-att-value="'next' if not survey_last else 'finish'"> + <i class="border-left fa fa-chevron-right p-2" /> + </button> + </template> + +</data> +</odoo> |
