[%- USE T8 %] [%- USE L %] [%- USE LxERP %] [%- USE HTML %][%- USE JavaScript -%] [% L.hidden_tag("", SELF.template_type, id="record_template_dialog_template_type", "data-controller"=SELF.data.controller, "data-load_action"=SELF.data.load_action, "data-save_action"=SELF.data.save_action, "data-form_selector"=SELF.data.form_selector) %]

[% LxERP.t8("Add new record template") %]

[% LxERP.t8("Name") %]: [% L.input_tag("", "", id="record_template_dialog_new_template_name") %] [% L.button_tag("kivi.RecordTemplate.create()", LxERP.t8("Save")) %]

[% LxERP.t8("Filter record template") %]

[% LxERP.t8("Name") %]: [% L.input_tag("template_filter", SELF.template_filter) %] [% L.submit_tag('', LxERP.t8("Filter")) %] [% L.button_tag('$("#template_filter").val("")', LxERP.t8('Reset')) %]

[% SET templates = SELF.templates.as_list %] [% IF templates.size %]

[% LxERP.t8("Existing templates") %]

[% FOREACH template = templates %] [% END %]
[% LxERP.t8("Action") %] [% LxERP.t8("Name") %] [% LxERP.t8("Modification date") %]
[% L.hidden_tag("", template.template_name, id="record_template_dialog_template_name_" _ template.id) %] [% L.button_tag("kivi.RecordTemplate.load(" _ template.id _ ")", LxERP.t8("Load")) %] [% L.button_tag("kivi.RecordTemplate.save(" _ template.id _ ")", LxERP.t8("Save")) %] [% L.button_tag("kivi.RecordTemplate.rename(" _ template.id _ ")", LxERP.t8("Rename")) %] [% L.button_tag("kivi.RecordTemplate.delete(" _ template.id _ ")", LxERP.t8("Delete")) %] [% HTML.escape(template.template_name) %] [% HTML.escape(template.mtime.to_kivitendo) %] [% HTML.escape(template.mtime.to_kivitendo_time) %]
[% ELSE %]

[% LxERP.t8("There are no record templates yet.") %]

[% END %]