1 [% USE HTML %][% USE LxERP %][% USE L %]
4 <div class="listtop">[% FORM.title %]</div>
6 [%- INCLUDE 'common/flash.html' %]
8 <form method="post" action="controller.pl">
9 [% L.hidden_tag('action', 'CsvImport/dispatch') %]
10 [% L.hidden_tag('profile.type', SELF.profile.type) %]
12 <h2>[%- LxERP.t8('Import profiles') %]</h2>
15 [%- IF SELF.profile.id %]
17 <th align="right">[%- LxERP.t8('Current profile') %]:</th>
18 <td>[%- HTML.escape(SELF.profile.name) %]</td>
22 [%- IF SELF.all_profiles.size %]
24 <th align="right">[%- LxERP.t8('Existing profiles') %]:</th>
26 [% L.select_tag('profile.id', L.options_for_select(SELF.all_profiles, title => 'name', default => SELF.profile.id), style => 'width: 300px') %]
29 [% L.submit_tag('action_new', LxERP.t8('Load profile')) %]
30 [% L.submit_tag('action_destroy', LxERP.t8('Delete profile'), confirm => LxERP.t8('Do you really want to delete this object?')) %]
36 <th align="right" valign="top">[%- LxERP.t8('Save settings as') %]:</th>
38 [% L.input_tag('profile.name', '', style => 'width: 300px') %]
40 [% L.checkbox_tag('profile.is_default', label => LxERP.t8('Make default profile')) %]
42 <td valign="top">[% L.submit_tag('action_save', LxERP.t8('Save profile')) %]</td>
48 <h2>[%- LxERP.t8('Settings') %]</h2>
52 <th align="right">[%- LxERP.t8('Charset') %]:</th>
53 <td colspan="10">[% L.select_tag('settings.charset', L.options_for_select(SELF.all_charsets, default => SELF.profile.get('charset'))) %]</td>
57 <th align="right">[%- LxERP.t8('Separator') %]:</th>
58 [% SET custom_sep_char = SELF.sep_char %]
59 [% FOREACH entry = SELF.all_sep_chars %]
61 [% IF SELF.sep_char == entry.first %] [% SET custom_sep_char = '' %] [%- END %]
62 [% L.radio_button_tag('sep_char', value => entry.first, label => entry.last, checked => SELF.sep_char == entry.first) %]
67 [% L.radio_button_tag('sep_char', value => 'custom', checked => custom_sep_char != '') %]
68 [% L.input_tag('custom_sep_char', custom_sep_char, size => 3, maxlength => 1) %]
73 <th align="right">[%- LxERP.t8('Quote character') %]:</th>
74 [% SET custom_quote_char = SELF.quote_char %]
75 [% FOREACH entry = SELF.all_quote_chars %]
77 [% IF SELF.quote_char == entry.first %] [% SET custom_quote_char = '' %] [%- END %]
78 [% L.radio_button_tag('quote_char', value => entry.first, label => entry.last, checked => SELF.quote_char == entry.first) %]
83 [% L.radio_button_tag('quote_char', value => 'custom', checked => custom_quote_char != '') %]
84 [% L.input_tag('custom_quote_char', custom_quote_char, size => 3, maxlength => 1) %]
89 <th align="right">[%- LxERP.t8('Escape character') %]:</th>
90 [% SET custom_escape_char = SELF.escape_char %]
91 [% FOREACH entry = SELF.all_escape_chars %]
93 [% IF SELF.escape_char == entry.first %] [% SET custom_escape_char = '' %] [%- END %]
94 [% L.radio_button_tag('escape_char', value => entry.first, label => entry.last, checked => SELF.escape_char == entry.first) %]
99 [% L.radio_button_tag('escape_char', value => 'custom', checked => custom_escape_char != '') %]
100 [% L.input_tag('custom_escape_char', custom_escape_char, size => 3, maxlength => 1) %]
106 [% L.submit_tag('action_test', LxERP.t8('Gogogo')) %]
110 <script type="text/javascript">
112 $(document).ready(function() {
113 $('#action_save').click(function() {
114 if ($('#profile_name').attr('value') != '')
116 alert('[% LxERP.t8('Please enter a profile name.') %]');