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;
'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?',
$(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>
-