Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

37 lines
1.4KB

  1. {% macro email_contact(text, subject) %}
  2. {# rot13 : https://rot13.com/ #}
  3. <script>
  4. {% if text is empty %}
  5. var text = "ntve@ynpbbcrengvirqrfpvgblraf.se";
  6. {% else %}
  7. var text = "{{ text|rot13 }}";
  8. {% endif %}
  9. var subject = "";
  10. {% if subject is not empty %}
  11. var subject = "?fhowrpg={{ subject|rot13 }}";
  12. {% endif %}
  13. document.write(("<n uers=\"znvygb:ntve@ynpbbcrengvirqrfpvgblraf.se" + subject + "\" ery=\"absbyybj\">" + text + "</n>").replace(/[a-zA-Z]/g, function (c) {
  14. return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
  15. }));
  16. </script>
  17. {% endmacro %}
  18. {% macro dropdown_search(field) %}
  19. <div class="dropdown dropdown-search allow-focus">
  20. <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton"
  21. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  22. {{ form_label(field) }}
  23. </button>
  24. <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  25. {% for checkbox in field.children %}
  26. <li>
  27. <label>
  28. {{ form_widget(checkbox) }}
  29. {{ form_label(checkbox) }}
  30. {{ form_errors(checkbox) }}
  31. </label>
  32. </li>
  33. {% endfor %}
  34. </ul>
  35. </div>
  36. {% endmacro %}