[% PROCESS 'elements.html' %]
[% IF message %]
[% message %]
[% END %]
[% IF id; text('Edit Reporting Unit'); ELSE; text('Add Reporting Unit'); END; %]
[% PROCESS input element_data = { type = "hidden" name = "id" value = id } %]
[% PROCESS input element_data = { type = "text" class = "control_code" name = "control_code" value = control_code label = text('Control Code') #' size = 16 }; IF sequences; PROCESS select element_data = { class = "sequence" name = "sequence" options = sequences default_values = [sequence] text_attr = 'label' value_attr = 'label' }; END; PROCESS select element_data = { label = text('Parent') class = "parent" options = parent_options text_attr = 'control_code' value_attr = 'id' name = 'parent_id' default_values= [parent_id] default_blank = 1 } %]
[% PROCESS input element_data = { name = "start_date" class = "date" label = text("Start Date") #" type = "text" value = start_date size = 12 } %] [% PROCESS input element_data = { name = "end_date" class = "date" label = text("End Date") #" type = "text" value = end_date size = 12 } %]
[% PROCESS input element_data = { label = text("Description:") name = "description" class = "description" value = description type = "text" } %]
[% PROCESS input element_data = { label = text("Customer") name = "customer" value = customer type = "text" size = 12 class = "search customer" } %]
[% IF mode == 'edit'; %]
[% PROCESS button element_data = { text = text("Save") type = "submit" class = "submit" name = "__action" value = "save" 'data-lsmb-doing' = text('Saving...') 'data-lsmb-done' = text('Saved') } %]
[% ELSE %]
[% PROCESS button element_data = { text = text("Save") type = "submit" class = "submit" name = "__action" value = "save_new" 'data-lsmb-doing' = text('Saving...') 'data-lsmb-done' = text('Saved') } %]
[% END %] [% PROCESS input element_data = { type = "hidden" name = "class_id" value = class_id } %]