Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision be0f02ee

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID be0f02ee8008482ceece366f2327203850756ad4
  • Vorgänger 51e60701
  • Nachfolger 6e445d41

Wiedervorlage für mehrere Benutzer: Erstellen und Bearbeiten

Unterschiede anzeigen:

bin/mozilla/fu.pl
83 83
    $form->{title} = $locale->text('Edit Follow-Up');
84 84
  }
85 85

  
86
  $form->{created_for_employees} = SL::DB::FollowUp->new(id => $form->{id})->load->created_for_employees;
87

  
86 88
  display_form();
87 89

  
88 90
  $main::lxdebug->leave_sub();
......
95 97

  
96 98
  my $form     = $main::form;
97 99

  
98
  $form->get_lists("employees" => "EMPLOYEES");
100
  $form->{all_employees} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
99 101

  
100 102
  my %params;
101 103
  $params{not_id}     = $form->{id} if ($form->{id});
......
107 109

  
108 110
  setup_fu_display_form_action_bar() unless $::form->{POPUP_MODE};
109 111

  
110
  $form->header(no_layout => $::form->{POPUP_MODE});
112
  $form->header(no_layout       => $::form->{POPUP_MODE},
113
                use_javascripts => [ qw(jquery.selectboxes jquery.multiselect2side) ],
114
  );
111 115
  print $form->parse_html_template('fu/add_edit');
112 116

  
113 117
  $main::lxdebug->leave_sub();
......
121 125
  my $form     = $main::form;
122 126
  my $locale   = $main::locale;
123 127

  
124
  $form->isblank('created_for_user', $locale->text('You must chose a user.'));
128
  $form->error(                      $locale->text('You must chose a user.'))          if !$form->{created_for_employees};
125 129
  $form->isblank('follow_up_date',   $locale->text('The follow-up date is missing.'));
126 130
  $form->isblank('subject',          $locale->text('The subject is missing.'));
127 131

  
128
  my %params = (map({ $_ => $form->{$_} } qw(id subject body note_id created_for_user follow_up_date)), 'done' => 0);
132
  my %params = (map({ $_ => $form->{$_} } qw(id subject body note_id created_for_employees follow_up_date)), 'done' => 0);
129 133

  
130 134
  _collect_links(\%params);
131 135

  
......
143 147
    $form->redirect();
144 148
  }
145 149

  
146
  delete @{$form}{qw(id subject body created_for_user follow_up_date)};
150
  delete @{$form}{qw(id subject body created_for_employees follow_up_date)};
147 151

  
148 152
  map { $form->{$_} = 1 } qw(due_only all_users not_done);
149 153

  

Auch abrufbar als: Unified diff