Revision aae0a190
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
32 | 32 |
#====================================================================== |
33 | 33 |
|
34 | 34 |
use POSIX qw(strftime); |
35 |
use List::Util qw(max); |
|
35 |
use List::Util qw(first max);
|
|
36 | 36 |
use List::MoreUtils qw(any); |
37 | 37 |
|
38 | 38 |
use SL::AM; |
... | ... | |
117 | 117 |
|
118 | 118 |
$form->get_lists('partsgroup' => 'ALL_PARTSGROUPS'); |
119 | 119 |
print $form->parse_html_template('ic/search', { %is_xyz, |
120 |
dateformat => $myconfig{dateformat},
|
|
120 |
dateformat => $myconfig{dateformat}, |
|
121 | 121 |
limit => $myconfig{vclimit}, }); |
122 | 122 |
|
123 | 123 |
$lxdebug->leave_sub(); |
... | ... | |
2042 | 2042 |
$main::lxdebug->leave_sub(); |
2043 | 2043 |
} |
2044 | 2044 |
|
2045 |
sub back_to_record { |
|
2046 |
_check_io_auth(); |
|
2047 |
|
|
2048 |
$::auth->restore_form_from_session($::form->{previousform}, clobber => 1); |
|
2049 |
$::form->{rowcount}--; |
|
2050 |
$::form->{action} = 'display_form'; |
|
2051 |
$::form->{callback} = $::form->{script} . '?' . join('&', map { $::form->escape($_) . '=' . $::form->escape($::form->{$_}) } sort keys %{ $::form }); |
|
2052 |
$::form->redirect; |
|
2053 |
} |
|
2054 |
|
|
2045 | 2055 |
sub continue { call_sub($form->{"nextsub"}); } |
2056 |
|
|
2057 |
sub dispatcher { |
|
2058 |
my $action = first { $::form->{"action_${_}"} } qw(add back_to_record); |
|
2059 |
$::form->error($::locale->text('No action defined.')) unless $action; |
|
2060 |
|
|
2061 |
$::form->{dispatched_action} = $action; |
|
2062 |
call_sub($action); |
|
2063 |
} |
templates/webpages/generic/new_item.html | ||
---|---|---|
3 | 3 |
|
4 | 4 |
<h4 class="error">[% 'Item not on file!' | $T8 %] |
5 | 5 |
|
6 |
|
|
7 | 6 |
<p>[% 'What type of item is this?' | $T8 %]</h4> |
8 | 7 |
|
9 | 8 |
<form method="post" action="ic.pl"> |
... | ... | |
18 | 17 |
<input type="hidden" name="[% HTML.escape(var.name) %]" value="[% HTML.escape(var.value) %]"> |
19 | 18 |
[%- END %] |
20 | 19 |
|
21 |
<input type="hidden" name="nextsub" value="add"> |
|
22 |
<input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
20 |
<input type="hidden" name="action" value="dispatcher"> |
|
21 |
<input class="submit" type="submit" name="action_add" value="[% 'Continue' | $T8 %]"> |
|
22 |
<input class="submit" type="submit" name="action_back_to_record" value="[% 'Back' | $T8 %]"> |
|
23 | 23 |
</form> |
24 | 24 |
|
25 | 25 |
</body> |
Auch abrufbar als: Unified diff
Maske 'Artikel nicht in DB; neu anlegen?' auch funktionierenden 'Zurück'-Button anzeigen