Commit f95d6695 authored by Frank Bergmann's avatar Frank Bergmann

- Implemented CSP (Content Security Policy)

parent 6ebce9d6
......@@ -2,13 +2,20 @@
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context;literal@</property>
<property name="main_navbar_label">user</property>
<property name="focus">@focus;literal@</property>
<h2>@page_title@</h2>
<!-- Show calendar on start- and end-date -->
<script type="text/javascript" <if @::__csp_nonce@ not nil>nonce="@::__csp_nonce;literal@"</if>>
window.addEventListener('load', function() {
document.getElementById('birthdate_calendar').addEventListener('click', function() { showCalendar('birthdate', 'y-m-d'); });
document.getElementById('start_date_calendar').addEventListener('click', function() { showCalendar('start_date', 'y-m-d'); });
document.getElementById('end_date_calendar').addEventListener('click', function() { showCalendar('end_date', 'y-m-d'); });
});
</script>
<h2>@page_title@</h2>
<if @message@ not nil>
<div class="general-message">@message@</div>
</if>
<property name="focus">@focus;literal@</property>
<formtemplate id="employee_information"></formtemplate>
......@@ -214,11 +214,9 @@ if {"" == $currency} { set currency $default_currency }
# -- ------------------------------------------------
set form_id "employee_information"
set after_html_birthday "<input type=\"button\" style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" onclick =\"return showCalendar('birthdate', 'y-m-d');\" >"
set after_html_start_date "<input type=\"button\" style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" onclick =\"return showCalendar('start_date', 'y-m-d');\" >"
set after_html_end_date "<input type=\"button\" style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" onclick =\"return showCalendar('end_date', 'y-m-d');\" >"
set after_html_birthday "<input type=\"button\" id=birthdate_calendar style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" >"
set after_html_start_date "<input type=\"button\" id=start_date_calendar style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" >"
set after_html_end_date "<input type=\"button\" id=end_date_calendar style=\"height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');\" >"
template::form::create $form_id
template::form::section $form_id ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment