Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 883a5485

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 883a5485970d83d429baeba7735c19e75327f1c4
  • Vorgänger ebdc6e13
  • Nachfolger 74e345d0

fu strict

Unterschiede anzeigen:

bin/mozilla/fu.pl
require "bin/mozilla/reportgenerator.pl";
use strict;
sub _collect_links {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $dest = shift;
my $form = $main::form;
$dest->{LINKS} = [];
foreach my $i (1 .. $form->{trans_rowcount}) {
......
push @{ $dest->{LINKS} }, { map { +"trans_$_" => $form->{"trans_${_}_$i"} } qw(id type info) };
}
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub add {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
_collect_links($form);
......
display_form();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub edit {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
my $ref = FU->retrieve('id' => $form->{id});
......
display_form();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub display_form {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
$form->get_lists("employees" => "EMPLOYEES");
......
$form->header();
print $form->parse_html_template('fu/add_edit');
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub save_follow_up {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
$form->isblank('created_for_user', $locale->text('You must chose a user.'));
$form->isblank('follow_up_date', $locale->text('The follow-up date is missing.'));
......
report();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub finish {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
if ($form->{id}) {
my $ref = FU->retrieve('id' => $form->{id});
......
report();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub delete {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
if ($form->{id}) {
my $ref = FU->retrieve('id' => $form->{id});
......
report();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub search {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
$form->get_lists("employees" => "EMPLOYEES");
......
$form->header();
print $form->parse_html_template('fu/search');
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub report {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
my $cgi = $main::cgi;
my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done);
......
$report->generate_with_headers();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub report_for_todo_list {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my @report_params = qw(created_for subject body reference follow_up_date_from follow_up_date_to itime_from itime_to due_only all_users done not_done);
......
'edit_url' => $edit_url, });
}
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
return $content;
}
sub edit_access_rights {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
my $access = FU->retrieve_access_rights();
......
$form->header();
print $form->parse_html_template('fu/edit_access_rights');
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub save_access_rights {
$lxdebug->enter_sub();
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
my %access;
......
$form->{SAVED_MESSAGE} = $locale->text('The access rights have been saved.');
edit_access_rights();
$lxdebug->leave_sub();
$main::lxdebug->leave_sub();
}
sub update {
call_sub($form->{nextsub});
call_sub($main::form->{nextsub});
}
sub continue {
call_sub($form->{nextsub});
call_sub($main::form->{nextsub});
}
sub save {
if ($form->{save_nextsub}) {
call_sub($form->{save_nextsub});
if ($main::form->{save_nextsub}) {
call_sub($main::form->{save_nextsub});
} else {
save_follow_up();
}
}
sub dispatcher {
$main::lxdebug->enter_sub();
my $form = $main::form;
my $locale = $main::locale;
foreach my $action (qw(finish save delete)) {
if ($form->{"action_${action}"}) {
call_sub($action);

Auch abrufbar als: Unified diff