# end of main
-sub add {
- $main::lxdebug->enter_sub();
-
- my $url = 'controller.pl?action=CustomerVendor/add&db='. ($::form->{db} eq 'vendor' ? 'vendor' : 'customer');
-
- if ( $::form->{callback} ) {
- $url .= '&callback='. uri_encode($::form->{callback});
- }
-
- print $::form->redirect_header($url);
-
- $main::lxdebug->leave_sub();
-}
-
sub search {
$main::lxdebug->enter_sub();
-[% USE T8 %][% USE HTML %]<form method="post" action="dispatcher.pl?M=ct">
+[% USE T8 %][% USE HTML %]
- <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
- <input name="db" type="hidden" value="[% HTML.escape(db) %]">
+<form method="post" action="controller.pl?action=CustomerVendor/add">
+ <input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
+ <input name="db" type="hidden" value="[% HTML.escape(db) %]">
- [% IF IS_CUSTOMER %][% 'New customer' | $T8 %][% ELSE %][% 'New vendor' | $T8 %][% END %]<br>
-
- <input class="submit" type="submit" name="A_add" value="[%- 'Add' | $T8 %]">
+ [% IF IS_CUSTOMER %][% 'New customer' | $T8 %][% ELSE %][% 'New vendor' | $T8 %][% END %]<br>
+ <input class="submit" type="submit" value="[%- 'Add' | $T8 %]">
</form>