|
- {% macro email_contact(text, subject) %}
- {# rot13 : https://rot13.com/ #}
- <script>
- {% if text is empty %}
- var text = "ntve@ynpbbcrengvirqrfpvgblraf.se";
- {% else %}
- var text = "{{ text|rot13 }}";
- {% endif %}
- var subject = "";
- {% if subject is not empty %}
- var subject = "?fhowrpg={{ subject|rot13 }}";
- {% endif %}
- document.write(("<n uers=\"znvygb:ntve@ynpbbcrengvirqrfpvgblraf.se" + subject + "\" ery=\"absbyybj\">" + text + "</n>").replace(/[a-zA-Z]/g, function (c) {
- return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
- }));
- </script>
- {% endmacro %}
-
- {% macro dropdown_search(field) %}
- <div class="dropdown dropdown-search allow-focus">
- <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- {{ form_label(field) }}
- </button>
- <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
- {% for checkbox in field.children %}
- <li>
- <label>
- {{ form_widget(checkbox) }}
- {{ form_label(checkbox) }}
- {{ form_errors(checkbox) }}
- </label>
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endmacro %}
|