[% SET CPANEL.CPVAR.dprefix = "../" %] [% SET CPANEL.CPVAR.itemsperpage = "25" %] [%# the first 2 API2 calls take the user’s input and make the necessary .parsed and .import files respectively, their return value is not used but we need to assign them to a variable so the stringified reference is not printed %] [% USE Api2; SET put_the_rv_here_instead_of_printing_it_out_a = Api2.exec("CSVImport" , "loaddata" , { "csvimportid" => FORM.item("csvimportid") }); SET put_the_rv_here_instead_of_printing_it_out_b = Api2.exec("CSVImport" , "configimport" , { "defaultdomain" => FORM.domain, "type" => FORM.importtype }); SET fetch_import_data = Api2.exec("CSVImport" , "fetchimportdata" , {}); SET return_link = "csvimport-step2.html?importtype=" _ RAW_FORM.importtype.uri() _ "&csvimportid=" _ RAW_FORM.csvimportid.uri(); %] [% WRAPPER '_assets/master.html.tt' app_key = 'address_importer' -%]
[% IF (FORM.importtype == "fwd") %]

[% locale.maketext("Import Forwarders") %]

[% END %] [% IF (FORM.importtype == "email") %]

[% locale.maketext("Import Email Accounts") %]

[% END %]

[% IF (FORM.importtype == "fwd") %] [% locale.maketext("Review the following forwarders.") %] [% END %] [% IF (FORM.importtype == "email") %] [% locale.maketext("Review the following email accounts.") %] [% END %]

[% IF (FORM.importtype == "email") %] [% END %] [% IF (FORM.importtype == "fwd") %] [% END %] [% IF (FORM.importtype == "email") %] [% IF fetch_import_data.size; %] [% FOREACH hashref IN fetch_import_data; %] [% END; %] [% ELSE %] [% END %] [% END %] [% IF (FORM.importtype == "fwd") %] [% IF fetch_import_data.size; %] [% FOREACH hashref IN fetch_import_data; %] [% END; %] [% ELSE %] [% END %] [% END %]
[% locale.maketext("Email Address") %] [% locale.maketext("Password") %] [% locale.maketext("Quota (MB)") %][% locale.maketext("Source") %] [% locale.maketext("Destination") %]
[% hashref.email.html() %] [% hashref.password.html() %] [% hashref.quota.html() %]
[% locale.maketext("No data could be extracted.") %]
[% hashref.source.html() %] [% hashref.target.html() %]
[% locale.maketext("No data could be extracted.") %]
[% INCLUDE _assets/return_link.html.tt return_location=return_link return_link_text=locale.maketext('Go Back') %]
[% END #wrapper %]