Odoo modules related to surveys
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

  1. from odoo import models, fields, api, _
  2. class SurveySurvey(models.Model):
  3. _inherit = 'survey.survey'
  4. @api.model
  5. def _get_default_style(self):
  6. return _("""/* Background (start and thank you) */
  7. /* .jumbotron {
  8. background-color: #e9ecef;
  9. } */
  10. /* Titles (survey and pages) */
  11. /* h1 {} */
  12. /* Descriptions (survey and pages) */
  13. /* p {} */
  14. /* Questions (title) */
  15. /* h2 {} */
  16. /* Responses labels */
  17. /* label {} */
  18. /* Buttons (start, navigate and submit) */
  19. /* .btn-primary {
  20. color: #FFFFFF;
  21. background-color: #00A09D;
  22. border-color: #00A09D;
  23. } */
  24. /* .btn-primary:hover {
  25. color: #FFFFFF;
  26. background-color: #007a77;
  27. border-color: #006d6b;
  28. } */""")
  29. scss_style = fields.Text(string="SCSS style", default=_get_default_style)
  30. start_btn_label = fields.Char(string="Start button label", translate=True, track_visibility='onchange',
  31. help="This label will be used in the survey start button. If empty, the label will be \"Start survey\".")
  32. submit_btn_label = fields.Char(string="Submit button label", translate=True, track_visibility='onchange',
  33. help="This label will be used in the survey submit button. If empty, the label will be \"Submit survey\".")
  34. thank_you_title = fields.Char(string="Thank you page title", translate=True,
  35. help="This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\".")