Commit 7a2e5b92 authored by Frank Bergmann's avatar Frank Bergmann

- Implemented CSP (Content Security Policy)

parent dad8cf1e
......@@ -2,13 +2,20 @@
<property name="doc(title)">@page_title;literal@</property>
<property name="context">@context;literal@</property>
<property name="main_navbar_label">finance</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('valid_from_calendar').addEventListener('click', function() { showCalendarWithDateWidget('valid_from', 'y-m-d'); });
document.getElementById('valid_through_calendar').addEventListener('click', function() { showCalendarWithDateWidget('valid_through', '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="price"></formtemplate>
......@@ -87,8 +87,8 @@ ad_form \
{task_type_id:text(im_category_tree),optional {label "[_ intranet-timesheet2-invoices.Task_Type]"} {custom {category_type "Intranet Project Type" translate_p 1 include_empty_p 1}} }
{material_id:text(select),optional {label "[_ intranet-timesheet2-invoices.Material]"} {options $material_options} }
{project_id:text(select),optional {label "[_ intranet-core.Project]"} {options $project_options} }
{valid_from:date(date),optional {label "[_ intranet-timesheet2.Start_Date]"} {after_html {<input type="button" style="height:23px; width:23px; background: url('/resources/acs-templating/calendar.gif');" onclick ="return showCalendarWithDateWidget('valid_from', 'y-m-d');" >}} }
{valid_through:date(date),optional {label "[_ intranet-timesheet2.End_Date]"} {after_html {<input type="button" style="height:23px; width:23px; background: url('/resources/acs-templating/calendar.gif');" onclick ="return showCalendarWithDateWidget('valid_through', 'y-m-d');" >}} }
{valid_from:date(date),optional {label "[_ intranet-timesheet2.Start_Date]"} {after_html {<input id=valid_from_calendar type="button" style="height:23px; width:23px; background: url('/resources/acs-templating/calendar.gif');" >}} }
{valid_through:date(date),optional {label "[_ intranet-timesheet2.End_Date]"} {after_html {<input id=valid_through_calendar type="button" style="height:23px; width:23px; background: url('/resources/acs-templating/calendar.gif');">}} }
{price:text(text) {label "[_ intranet-timesheet2-invoices.Price]"} {html {size 10}}}
{currency:text(select) {label "[_ intranet-timesheet2-invoices.Currency]"} {options $currency_options} }
}
......
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