Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6ebacae9

Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt

  • ID 6ebacae90e52d35ce729638490a015060f12fee3
  • Vorgänger 9205a42e
  • Nachfolger 8651e027

ActionBar: Verwendung bei Wiedervorlagen

Unterschiede anzeigen:

bin/mozilla/fu.pl
use POSIX qw(strftime);
use SL::FU;
use SL::Locale::String qw(t8);
use SL::ReportGenerator;
require "bin/mozilla/reportgenerator.pl";
......
$params{trans_id} = $form->{LINKS}->[0]->{trans_id} if (@{ $form->{LINKS} });
$form->{FOLLOW_UPS} = FU->follow_ups(%params);
setup_fu_display_form_action_bar() unless $::form->{POPUP_MODE};
$form->header(no_layout => $::form->{POPUP_MODE});
print $form->parse_html_template('fu/add_edit');
......
$form->{title} = $locale->text('Follow-Ups');
setup_fu_search_action_bar();
$form->header();
print $form->parse_html_template('fu/search');
......
$report->add_data($row);
}
setup_fu_report_action_bar();
$report->generate_with_headers();
$main::lxdebug->leave_sub();
......
$form->{title} = $locale->text('Edit Access Rights for Follow-Ups');
setup_fu_edit_access_rights_action_bar();
$form->header();
print $form->parse_html_template('fu/edit_access_rights');
......
$form->error($locale->text('No action defined.'));
}
sub setup_fu_search_action_bar {
my %params = @_;
for my $bar ($::request->layout->get('actionbar')) {
$bar->add(
action => [
t8('Show'),
submit => [ '#form', { action => "report" } ],
accesskey => 'enter',
],
);
}
}
sub setup_fu_display_form_action_bar {
my %params = @_;
for my $bar ($::request->layout->get('actionbar')) {
$bar->add(
action => [
t8('Save'),
submit => [ '#form', { action => "save" } ],
accesskey => 'enter',
],
action => [
t8('Finish'),
submit => [ '#form', { action => "finish" } ],
disabled => !$::form->{id} ? t8('The object has not been saved yet.') : undef,
],
action => [
t8('Delete'),
submit => [ '#form', { action => "delete" } ],
disabled => !$::form->{id} ? t8('The object has not been saved yet.') : undef,
confirm => t8('Do you really want to delete this object?'),
],
);
}
}
sub setup_fu_report_action_bar {
my %params = @_;
for my $bar ($::request->layout->get('actionbar')) {
$bar->add(
action => [
t8('Finish'),
submit => [ '#form', { action => "finish" } ],
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ],
],
action => [
t8('Delete'),
submit => [ '#form', { action => "delete" } ],
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ],
confirm => t8('Do you really want to delete the selected objects?'),
],
);
}
}
sub setup_fu_edit_access_rights_action_bar {
my %params = @_;
for my $bar ($::request->layout->get('actionbar')) {
$bar->add(
action => [
t8('Save'),
submit => [ '#form', { action => "save_access_rights" } ],
accesskey => 'enter',
],
);
}
}
1;
locale/de/all
'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?',
'Do you really want to delete the selected documents?' => 'Wollen Sie wirklich diese Dateien löschen?',
'Do you really want to delete the selected links?' => 'Wollen Sie wirklich die ausgewählten Verknüpfungen löschen?',
'Do you really want to delete the selected objects?' => 'Wollen Sie die ausgewählten Objekte wirklich löschen?',
'Do you really want to delete this draft?' => 'Wollen Sie diesen Entwurf wirklich löschen?',
'Do you really want to delete this object?' => 'Wollen Sie dieses Objekt wirklich löschen?',
'Do you really want to delete this record template?' => 'Wollen Sie diese Belegvorlage wirklich löschen?',
templates/webpages/fu/add_edit.html
$(function(){ document.Form.subject.focus(); });
</script>
<form action="fu.pl" method="post" name="Form">
<form action="fu.pl" method="post" name="Form" id="form">
[%- IF SAVED_MESSAGE %]
<p>[% SAVED_MESSAGE %]</p>
......
</table>
</p>
[%- IF POPUP_MODE %]
<p>
<input type="hidden" name="action" value="dispatcher">
<input type="submit" class="submit" name="action_save" value="[% 'Save' | $T8 %]">
......
<input type="submit" class="submit" name="action_finish" value="[% 'Finish' | $T8 %]">
<input type="submit" class="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
[%- END %]
[%- IF POPUP_MODE %]
<input type="submit" class="submit" onclick="window.close()" value="[% 'Cancel' | $T8 %]">
[%- END %]
</p>
[%- IF POPUP_MODE %]
[%- IF FOLLOW_UPS.size %]
<hr height="3" noshade>
......
<input type="hidden" name="trans_rowcount" value="[% LINKS.size %]">
</form>
templates/webpages/fu/edit_access_rights.html
<p>[% 'Allow the following users access to my follow-ups:' | $T8 %]</p>
<form action="fu.pl" method="post" name="Form">
<form action="fu.pl" method="post" name="Form" id="form">
<p>
<table>
<tr>
......
</p>
<input type="hidden" name="rowcount" value="[% EMPLOYEES.size %]">
<input type="hidden" name="save_nextsub" value="save_access_rights">
<p>
<input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]">
</p>
</form>
templates/webpages/fu/report_bottom.html
[%- FOREACH item = HIDDEN %]
<input type="hidden" name="[% HTML.escape(item.key) %]" value="[% HTML.escape(item.value) %]">
[%- END %]
<p>
[% 'Follow-Ups' | $T8 %]<br>
<input type="hidden" name="action" value="dispatcher">
<input type="submit" name="action_finish" value="[% 'Finish' | $T8 %]">
<input type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
</p>
</form>
templates/webpages/fu/report_top.html
</p>
[%- END %]
<form action="fu.pl" method="post" name="Form">
<form action="fu.pl" method="post" name="Form" id="form">
templates/webpages/fu/search.html
$(function(){ document.Form.subject.focus(); });
</script>
<form action="fu.pl" method="post" name="Form">
<input type="hidden" name="nextsub" value="report">
<form action="fu.pl" method="post" name="Form" id="form">
<p>
<table>
<tr>
......
</table>
</p>
<p>
<input type="submit" name="action" value="[% 'Continue' | $T8 %]">
</p>
</form>

Auch abrufbar als: Unified diff