X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Ftime_script.tpl;h=3e8a0202420151cc6aedb66654a77f1174f74a33;hb=45ca7d2258832cb0d2465eb16dd646d925458106;hp=109f67ee8013c7bb37f4d2999168a571f99e5f59;hpb=4c63df1707fc6544e380af0e2e77ccdc84ab00a7;p=timetracker.git diff --git a/WEB-INF/templates/time_script.tpl b/WEB-INF/templates/time_script.tpl index 109f67ee..3e8a0202 100644 --- a/WEB-INF/templates/time_script.tpl +++ b/WEB-INF/templates/time_script.tpl @@ -43,6 +43,21 @@ var task_names = new Array(); task_names[{$task.id}] = "{$task.name|escape:'javascript'}"; {/foreach} +{if $template_dropdown} +var templates = new Array(); +{foreach $templates as $template} + templates[{$template.id}] = "{$template.content|escape:'javascript'}"; +{/foreach} + +// The fillNote function populates the Note field with a selected template body. +function fillNote(id) { + if (!id) return; // Do nothing. + var template_body = templates[id]; + var note = document.getElementById("note"); + note.value = template_body; +} +{/if} + // Mandatory top options for project and task dropdowns. var empty_label_project = "{$i18n.dropdown.select|escape:'javascript'}"; var empty_label_task = "{$i18n.dropdown.select|escape:'javascript'}";