Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorJan Büren <jan@lx-office-premium.de>
Fri, 28 Jun 2013 10:00:01 +0000 (12:00 +0200)
committerJan Büren <jan@lx-office-premium.de>
Fri, 28 Jun 2013 10:00:01 +0000 (12:00 +0200)
Conflicts:
bin/mozilla/do.pl
bin/mozilla/ir.pl
bin/mozilla/oe.pl

37 files changed:
SL/Controller/CustomVariableConfig.pm
SL/Controller/LoginScreen.pm
SL/Controller/Project.pm
bin/mozilla/acctranscorrections.pl
bin/mozilla/am.pl
bin/mozilla/amtemplates.pl
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/fu.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
bin/mozilla/sepa.pl
bin/mozilla/vk.pl
bin/mozilla/wh.pl
locale/de/all
templates/webpages/am/edit_price_factor.html
templates/webpages/am/edit_templates.html
templates/webpages/am/edit_warehouse.html
templates/webpages/ap/search.html
templates/webpages/ar/form_header.html
templates/webpages/ct/form_header.html
templates/webpages/ct/search.html
templates/webpages/custom_variable_config/form.html
templates/webpages/dunning/add.html
templates/webpages/dunning/search.html
templates/webpages/generic/edit_email.html
templates/webpages/ic/form_header.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_header.html
templates/webpages/login_screen/user_login.html
templates/webpages/project/form.html

index d87b8ac..b366ffb 100644 (file)
@@ -64,7 +64,6 @@ sub show_form {
     split m/;/, ($self->config->flags || '')
   ]);
 
-  $::request->layout->focus('#config_name');
   $self->render('custom_variable_config/form', %params);
 }
 
index 385ce6f..a06686a 100644 (file)
@@ -32,7 +32,7 @@ sub action_user_login {
   return if $self->_redirect_to_main_script_if_already_logged_in;
 
   # Otherwise show the login form.
-  $self->show_login_form(error => error_state($::form->{error}));
+  $self->show_login_form(error_state($::form->{error}));
 }
 
 sub action_logout {
@@ -158,10 +158,12 @@ sub _ensure_employees_for_authorized_users_exist {
 }
 
 sub error_state {
-  return {
-    session  => $::locale->text('The session is invalid or has expired.'),
-    password => $::locale->text('Incorrect username or password or no access to selected client!'),
-  }->{$_[0]};
+  my %states = (
+    session  => { warning => t8('The session has expired. Please log in again.')                   },
+    password => { error   => t8('Incorrect username or password or no access to selected client!') },
+  );
+
+  return %{ $states{$_[0]} || {} };
 }
 
 sub set_layout {
@@ -181,7 +183,6 @@ sub init_default_client_id {
 sub show_login_form {
   my ($self, %params) = @_;
 
-  $::request->layout->focus('#auth_login');
   $self->render('login_screen/user_login', %params);
 }
 
index 46a8c59..d152d6a 100644 (file)
@@ -149,8 +149,6 @@ sub display_form {
   $params{CUSTOM_VARIABLES} = CVar->get_custom_variables(module => 'Projects', trans_id => $self->project->id);
   CVar->render_inputs(variables => $params{CUSTOM_VARIABLES}) if @{ $params{CUSTOM_VARIABLES} };
 
-  $::request->{layout}->focus('#projectnumber');
-
   $self->render('project/form', %params);
 }
 
index 3518562..6ee397f 100644 (file)
@@ -14,7 +14,6 @@ sub analyze_filter {
   my $form     = $main::form;
   my $locale   = $main::locale;
 
-  $form->{jsscript} = 1;
   $form->{title}    = $locale->text('General ledger corrections');
   $form->header();
   print $form->parse_html_template('acctranscorrections/analyze_filter');
index ad6248f..c918770 100644 (file)
@@ -1558,7 +1558,6 @@ sub add_price_factor {
 
   $form->{title}      = $locale->text('Add Price Factor');
   $form->{callback} ||= build_std_url('action=add_price_factor');
-  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_price_factor');
@@ -1577,7 +1576,6 @@ sub edit_price_factor {
 
   $form->{title}      = $locale->text('Edit Price Factor');
   $form->{callback} ||= build_std_url('action=add_price_factor');
-  $::request->{layout}->focus('#description');
 
   AM->get_price_factor(\%myconfig, $form);
 
@@ -1665,7 +1663,6 @@ sub add_warehouse {
 
   $form->{title}      = $locale->text('Add Warehouse');
   $form->{callback} ||= build_std_url('action=add_warehouse');
-  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_warehouse');
@@ -1688,7 +1685,6 @@ sub edit_warehouse {
 
   $form->{title}      = $locale->text('Edit Warehouse');
   $form->{callback} ||= build_std_url('action=list_warehouses');
-  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_warehouse');
index 6d7e399..f8c6972 100644 (file)
@@ -275,10 +275,7 @@ sub display_template_form {
 
     $options{"CAN_EDIT"} = $form->{"edit"};
 
-    if ($form->{edit}) {
-      $::request->{layout}->focus("#edit_content");
-
-    } else {
+    if (!$form->{edit}) {
       $options{"content"}                 = "\n\n" if (!$options{"content"});
       $options{"SHOW_SECOND_EDIT_BUTTON"} = $options{"lines"} > 25;
     }
index e566ea6..4531e99 100644 (file)
@@ -296,8 +296,6 @@ sub form_header {
     $taxcharts{$item->{id}} = $item;
   }
 
-  $form->{jsscript} = 1;
-
   my $follow_up_vc         =  $form->{vendor};
   $follow_up_vc            =~ s/--.*?//;
   my $follow_up_trans_info =  "$form->{invnumber} ($follow_up_vc)";
@@ -807,15 +805,12 @@ sub search {
   $form->all_vc(\%myconfig, "vendor", "AP");
 
   $form->{title}    = $locale->text('AP Transactions');
-  $::request->{layout}->focus('#vendor');
-  $form->{jsscript} = 1;
 
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
                    "departments"  => "ALL_DEPARTMENTS",
                    "vendors"      => "ALL_VC");
 
   # constants and subs for template
-  $form->{jsscript}  = 1;
   $form->{vc_keys}   = sub { "$_[0]->{name}--$_[0]->{id}" };
 
   $form->header;
index e1b10f6..038e59e 100644 (file)
@@ -315,8 +315,6 @@ sub form_header {
     $taxcharts{$item->{id}} = $item;
   }
 
-  $::request->{layout}->focus("#customer");
-
   my $follow_up_vc         =  $form->{customer};
   $follow_up_vc            =~ s/--.*?//;
   my $follow_up_trans_info =  "$form->{invnumber} ($follow_up_vc)";
@@ -836,14 +834,10 @@ sub search {
   my $locale   = $main::locale;
   my $cgi      = $::request->{cgi};
 
-  my ($customer, $department);
-  my ($jsscript, $button1, $button2);
-
   # setup customer selection
   $form->all_vc(\%myconfig, "customer", "AR");
 
   $form->{title}    = $locale->text('AR Transactions');
-  $form->{jsscript} = 1;
 
   # Auch in Rechnungsübersicht nach Kundentyp filtern - jan
   $form->get_lists("projects"       => { "key" => "ALL_PROJECTS", "all" => 1 },
@@ -854,7 +848,6 @@ sub search {
   $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
 
   # constants and subs for template
-  $form->{jsscript}  = 1;
   $form->{vc_keys}   = sub { "$_[0]->{name}--$_[0]->{id}" };
 
   $form->header;
index 1ce1c2f..4291871 100644 (file)
@@ -101,9 +101,7 @@ sub search {
                                                                            'include_prefix' => 'l_',
                                                                            'include_value'  => 'Y');
 
-  $form->{jsscript} = 1;
   $form->{title}    = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors');
-  $::request->{layout}->focus('#name');
 
   $form->header();
   print $form->parse_html_template('ct/search');
@@ -475,9 +473,7 @@ sub form_header {
   $form->{shipto_label}   = \&_shipto_label;
   $form->{contacts_label} = \&_contacts_label;
   $form->{taxzone_id}     = 0                                                               if !$form->{id};
-  $form->{jsscript}       = 1;
   $form->{SHIPTO_ALL}     = [ +{ shipto_id => '0', shiptoname => $::locale->text('All') }, @{ $form->{SHIPTO} } ];
-  $::request->{layout}->focus("#greeting");
 
   $form->{title} = $form->{title_save}
                 || $locale->text("$form->{title} " . ucfirst $form->{db}) . ($form->{title} eq "Edit" ? " $form->{name}" : '');
index e9df309..01658ab 100644 (file)
@@ -105,8 +105,6 @@ sub add {
   $form->{SHOW_DEPARTMENT_SELECTION}    = $form->{all_departments} && scalar @{ $form->{all_departments} || [] };
 
   $form->{title}    = $locale->text('Start Dunning Process');
-  $form->{jsscript} = 1;
-  $::request->{layout}->focus('#customer');
   $form->header();
 
   print $form->parse_html_template("dunning/add");
@@ -144,7 +142,6 @@ sub show_invoices {
 
   $form->{type}           = 'dunning';
   $form->{rowcount}       = scalar @{ $form->{DUNNINGS} };
-  $form->{jsscript}       = 1;
   $form->{callback}     ||= build_std_url("action=show_invoices", qw(customer invnumber ordnumber groupinvoices minamount dunning_level notes));
 
   $form->{PRINT_OPTIONS}  = print_options('inline'          => 1,
@@ -308,9 +305,7 @@ sub search {
   $form->{SHOW_DEPARTMENT_DDBOX} = scalar @{ $form->{ALL_CUSTOMERS} };
   $form->{SHOW_DUNNING_LEVELS}   = scalar @{ $form->{DUNNING} };
 
-  $form->{jsscript} = 1;
   $form->{title}    = $locale->text('Dunnings');
-  $::request->{layout}->focus('#customer');
 
   $form->header();
 
index 3e0c7e0..d6a51bc 100644 (file)
@@ -166,7 +166,6 @@ sub order_links {
 
   # retrieve order/quotation
   $form->{webdav}   = $::instance_conf->get_webdav;
-  $form->{jsscript} = 1;
 
   my $editing = $form->{id};
 
@@ -255,9 +254,6 @@ sub form_header {
   $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
   $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
 
-  # use JavaScript Calendar or not
-  $form->{jsscript} = 1;
-
   my @old_project_ids = ($form->{"globalproject_id"});
   map({ push(@old_project_ids, $form->{"project_id_$_"})
           if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"}));
@@ -460,7 +456,6 @@ sub search {
   $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   $form->{SHOW_VC_DROP_DOWN} =  $myconfig{vclimit} > scalar @{ $form->{ALL_VC} };
-  $form->{jsscript}          = 1;
   $form->{title}             = $locale->text('Delivery Orders');
 
   $form->header();
@@ -1125,8 +1120,6 @@ sub display_stock_in_form {
   my %myconfig = %main::myconfig;
   my $locale   = $main::locale;
 
-  $form->{jsscript} = 1;
-
   $form->{title} = $locale->text('Stock');
 
   my $part_info  = IC->get_basic_part_info('id' => $form->{parts_id});
index ef80a73..8dc5db6 100644 (file)
@@ -99,8 +99,6 @@ sub display_form {
   $params{trans_id}   = $form->{LINKS}->[0]->{trans_id} if (@{ $form->{LINKS} });
   $form->{FOLLOW_UPS} = FU->follow_ups(%params);
 
-  $form->{jsscript}   = 1;
-
   $form->header(no_layout => $::form->{POPUP_MODE});
   print $form->parse_html_template('fu/add_edit');
 
@@ -232,7 +230,6 @@ sub search {
 
   $form->get_lists("employees" => "EMPLOYEES");
 
-  $form->{jsscript} = 1;
   $form->{title}    = $locale->text('Follow-Ups');
 
   $form->header();
index 837b842..c68fef0 100644 (file)
@@ -106,8 +106,6 @@ sub search {
   $form->{title} = $locale->text($form->{title});
   $form->{title} = $locale->text('Assemblies') if ($is_xyz{is_assembly});
 
-  $form->{jsscript} = 1;
-
   $form->{CUSTOM_VARIABLES}                  = CVar->get_configs('module' => 'IC');
   ($form->{CUSTOM_VARIABLES_FILTER_CODE},
    $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables'      => $form->{CUSTOM_VARIABLES},
@@ -1610,16 +1608,11 @@ sub form_header {
     flash('info', $::locale->text('This partnumber is not unique. You should change it.'));
   }
 
-  # use JavaScript Calendar or not (yes!)
-  $form->{jsscript} = 1;
-
   my $units = AM->retrieve_units(\%myconfig, $form);
   $form->{ALL_UNITS} = [ map +{ name => $_ }, sort { $units->{$a}{sortkey} <=> $units->{$b}{sortkey} } keys %$units ];
 
   $form->{defaults} = AM->get_defaults();
 
-  $::request->{layout}->focus("#partnumber");
-
   $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id});
 
   CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}, show_disabled_message => 1)
index e67bbbb..e7ba050 100644 (file)
@@ -996,7 +996,6 @@ sub edit_e_mail {
   my $attachment_filename = $form->generate_attachment_filename();
   my $subject             = $form->{subject} || $form->generate_email_subject();
 
-  $::request->{layout}->focus($form->{"email"} ? "#subject" : "#email");
   $form->header;
 
   my (@dont_hide_key_list, %dont_hide_key, @hidden_keys);
index 3d49885..3653891 100644 (file)
@@ -102,7 +102,6 @@ sub invoice_links {
 
   # create links
   $form->{webdav}   = $::instance_conf->get_webdav;
-  $form->{jsscript} = 1;
 
   $form->create_links("AP", \%myconfig, "vendor");
 
@@ -329,8 +328,6 @@ sub form_header {
   $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
   $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
 
-  $::request->{layout}->focus('#vendor');
-
   my $follow_up_vc         =  $form->{vendor};
   $follow_up_vc            =~ s/--\d*\s*$//;
   $TMPL_VAR{vendor_name} = $follow_up_vc;
@@ -357,7 +354,6 @@ sub form_header {
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
 
-  $form->{jsscript} = 1;
   $form->header();
 
   print $form->parse_html_template("ir/form_header", \%TMPL_VAR);
index fe387d1..f6cd5e7 100644 (file)
@@ -76,8 +76,6 @@ sub add {
 
   $form->{callback} = "$form->{script}?action=add&type=$form->{type}" unless $form->{callback};
 
-  $form->{jsscript} = "date";
-
   &invoice_links;
   &prepare_invoice;
   &display_form;
@@ -353,8 +351,6 @@ sub form_header {
   $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
   $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
 
-  $::request->{layout}->focus('#customer');
-
   my $follow_up_vc         =  $form->{customer};
   $follow_up_vc            =~ s/--\d*\s*$//;
   $TMPL_VAR{customer_name} = $follow_up_vc;
@@ -381,7 +377,6 @@ sub form_header {
   ), @custom_hiddens,
   map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
 
-  $form->{jsscript} = 1;
   $form->header();
 
   print $form->parse_html_template("is/form_header", \%TMPL_VAR);
index 8b2b79a..e4139ff 100644 (file)
@@ -230,7 +230,6 @@ sub order_links {
 
   # retrieve order/quotation
   $form->{webdav}   = $::instance_conf->get_webdav;
-  $form->{jsscript} = 1;
 
   my $editing = $form->{id};
 
@@ -318,9 +317,6 @@ sub form_header {
   $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
   $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
 
-  # use JavaScript Calendar or not
-  $form->{jsscript} = 1;
-
   # openclosed checkboxes
   my @tmp;
   push @tmp, sprintf qq|<input name="delivered" id="delivered" type="checkbox" class="checkbox" value="1" %s><label for="delivered">%s</label>|,
@@ -725,7 +721,6 @@ sub search {
   $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
 
   # constants and subs for template
-  $form->{jsscript}        = 1;
   $form->{vc_keys}         = sub { "$_[0]->{name}--$_[0]->{id}" };
 
   $form->header();
index 4e2a223..2850bfb 100755 (executable)
@@ -127,8 +127,6 @@ sub bank_transfer_create {
 
     my $bank_account_label_sub = sub { $locale->text('Account number #1, bank code #2, #3', $_[0]->{account_number}, $_[0]->{bank_code}, $_[0]->{bank}) };
 
-    $form->{jsscript}          = 1;
-
     $form->header();
     print $form->parse_html_template('sepa/bank_transfer_create',
                                      { 'BANK_TRANSFERS'     => \@bank_transfers,
@@ -169,7 +167,6 @@ sub bank_transfer_search {
   my $vc     = $form->{vc} eq 'customer' ? 'customer' : 'vendor';
 
   $form->{title}    = $vc eq 'customer' ? $::locale->text('List of bank collections') : $locale->text('List of bank transfers');
-  $form->{jsscript} = 1;
 
   $form->header();
   print $form->parse_html_template('sepa/bank_transfer_search', { vc => $vc });
@@ -330,7 +327,6 @@ sub bank_transfer_edit {
     $form->error($locale->text('That export does not exist.'));
   }
 
-  $form->{jsscript} = 1;
   $form->{title}    = $locale->text('View SEPA export');
   $form->header();
   print $form->parse_html_template('sepa/bank_transfer_edit',
index a60d430..9206e7e 100644 (file)
@@ -61,7 +61,6 @@ sub search_invoice {
   $form->all_vc(\%myconfig, "customer", "AR");
 
   $form->{title}    = $locale->text('Sales Report');
-  $form->{jsscript} = 1;
 
   $form->get_lists("projects"        => { "key" => "ALL_PROJECTS", "all" => 1 },
                    "departments"     => "ALL_DEPARTMENTS",
@@ -104,10 +103,10 @@ sub invoice_transactions {
 
   # can't currently be configured from report, empty line between main sortings
   my $addemptylines = 1;
-  
+
   # don't add empty lines between mainsort subtotals when only subtotal_mainsort is selected
   if ($form->{l_subtotal_mainsort} eq "Y" and not defined $form->{l_headers_mainsort} and not defined $form->{l_headers_subsort} and not defined $form->{l_subtotal_subsort} ) {
-    $addemptylines = 0 
+    $addemptylines = 0
   };
 
   if ( $form->{customer} =~ /--/ ) {
index f76b4e9..b8cda2b 100644 (file)
@@ -105,8 +105,6 @@ sub transfer_warehouse_selection {
 
   my $content;
 
-  $form->{jsscript} = 1;
-
   if ($form->{trans_type} eq 'removal') {
     $form->{nextsub} = "removal_parts_selection";
     $form->{title}   = $locale->text('Removal from Warehouse');
@@ -657,8 +655,6 @@ sub journal {
 
   show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
 
-  $form->{jsscript} = 1;
-
   $form->header();
   print $form->parse_html_template("wh/journal_filter", { "UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)) });
 
@@ -803,8 +799,6 @@ sub report {
 
   show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
 
-  $form->{jsscript} = 1;
-
   $form->{title}   = $locale->text("Report about warehouse contents");
 
   $form->header();
index 29fe6de..5c36e7b 100755 (executable)
@@ -2109,6 +2109,7 @@ $self->{texts} = {
   'The selected exports have been closed.' => 'Die ausgewählten Exporte wurden abgeschlossen.',
   'The selected warehouse does not exist.' => 'Das ausgew&auml;hlte Lager existiert nicht.',
   'The selected warehouse is empty, or no stocked items where found that match the filter settings.' => 'Das ausgewählte Lager ist leer, oder in ihm wurden keine zu den Sucheinstellungen passenden eingelagerten Artikel gefunden.',
+  'The session has expired. Please log in again.' => 'Die Sitzung ist abgelaufen. Bitte melden Sie sich erneut an.',
   'The session is invalid or has expired.' => 'Sie sind von kivitendo abgemeldet.',
   'The settings were saved, but the password was not changed.' => 'Die Einstellungen wurden gespeichert, aber das Passwort wurde nicht geändert.',
   'The source warehouse does not contain any bins.' => 'Das Quelllager enth&auml;lt keine Lagerpl&auml;tze.',
index dc00c7c..a219130 100644 (file)
@@ -11,7 +11,7 @@
    <table border="0">
     <tr>
      <td align="right">[% 'Description' | $T8 %]</td>
-     <td><input id="description" name="description" value="[% HTML.escape(description) %]"></td>
+     <td><input id="description" name="description" value="[% HTML.escape(description) %]" class="initial_focus"></td>
     </tr>
 
     <tr>
@@ -31,4 +31,3 @@
    [% IF id %][% IF orphaned %]<input type="submit" name="action" value="[% 'Delete' | $T8 %]">[% END %][% END %]
   </p>
  </form>
-
index 220b9ec..9d7420c 100644 (file)
@@ -53,7 +53,7 @@
    </p>
 
    [% IF CAN_EDIT %]
-    <p><textarea name="content" id="edit_content" cols="100" rows="25">[% HTML.escape(content) %]</textarea></p>
+    <p><textarea name="content" id="edit_content" cols="100" rows="25"[% IF edit %] class="initial_focus"[% END %]>[% HTML.escape(content) %]</textarea></p>
 
     <p>
      <input type="hidden" name="save_nextsub" value="save_template">
@@ -78,4 +78,3 @@
   [% END %] <!-- SHOW_CONTENT -->
 
  </form>
-
index 2208de5..9da65b8 100644 (file)
@@ -17,7 +17,7 @@
    <tr>
     <td align="right">[% 'Description' | $T8 %]</td>
     <td>
-     <input id='description' name="description" size="60" value="[% HTML.escape(description) %]">
+     <input id='description' name="description" size="60" value="[% HTML.escape(description) %]" class="initial_focus">
      <input type="hidden" name="orig_description" value="[% HTML.escape(description) %]">
     </td>
    </tr>
  [% END %]
 
  [% END %]
-
index 99898a6..9932cdd 100644 (file)
@@ -17,6 +17,7 @@
                  name          = 'vendor',
                  default       = oldvendor,
                  style         = 'width: 250px',
+                 class         = 'initial_focus',
                  DATA          = ALL_VC,
                  id_sub        = 'vc_keys',
                  label_key     = 'name',
index 8d470fa..af9262d 100644 (file)
@@ -39,9 +39,9 @@
                 <th align="right" nowrap>[% 'Customer' | $T8 %]</th>
                 <td colspan=3>
 [%- IF selectcustomer %]
-    <select id='customer' name="customer" onchange="document.getElementById('update_button').click();">[% selectcustomer %]</select>
+    <select id='customer' name="customer" onchange="document.getElementById('update_button').click();" class="initial_focus">[% selectcustomer %]</select>
 [%- ELSE %]
-    <input id='customer' name=customer value="[% customer | html %]" size=35>
+    <input id='customer' name=customer value="[% customer | html %]" size=35 class="initial_focus">
 [%- END %]
                 <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')"></td>
                 [% L.hidden_tag('selectcustomer', selectcustomer) %]
index ff2d36b..294cf47 100644 (file)
@@ -80,7 +80,7 @@
      <tr>
       <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
       <td>
-       <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]">&nbsp;
+       <input id="greeting" name="greeting" size="30" value="[% HTML.escape(greeting) %]" class="initial_focus">&nbsp;
        [%- INCLUDE generic/multibox.html
              name       = 'selected_company_greeting',
              DATA       = MB_COMPANY_GREETINGS,
index 9d3f696..617925e 100644 (file)
@@ -15,7 +15,7 @@
 
    <tr>
     <th align="right" nowrap>[% IF IS_CUSTOMER %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
-    <td><input id="name" name="name" size="35"></td>
+    <td><input id="name" name="name" size="35" class="initial_focus"></td>
    </tr>
 
    <tr>
 
   <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
-
index f29a3d8..2703cdc 100644 (file)
@@ -12,7 +12,7 @@
 
    <tr>
     <td align="right">[% 'Variable Name' | $T8 %]<sup><span class="small-text">(1)</span></sup></td>
-    <td>[%- L.input_tag("config.name", SELF.config.name) %]</td>
+    <td>[%- L.input_tag("config.name", SELF.config.name, class='initial_focus') %]</td>
    </tr>
 
    <tr>
index c58651e..7648bf2 100644 (file)
@@ -9,12 +9,12 @@
     <th align="right">[% 'Customer' | $T8 %]</th>
     <td colspan="3">
      [% IF SHOW_CUSTOMER_SELECTION %]
-      <select name="customer">
+      <select name="customer" class="initial_focus">
        <option></option>
        [% FOREACH row = all_customer %]<option>[% HTML.escape(row.name) %]--[% HTML.escape(row.id) %]</option>[% END %]
       </select>
       [% ELSE %]
-      <input name="customer" size="35">
+      <input name="customer" size="35" class="initial_focus">
      [% END %]
     </td>
    </tr>
@@ -81,5 +81,3 @@
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
 
  </form>
-
-
index 1873788..f27c2fe 100644 (file)
        <th align="right">[% 'Customer' | $T8 %]</th>
        <td colspan="3">
         [% IF SHOW_CUSTOMER_DDBOX %]
-         <select id='customer' name="customer_id">
+         <select id='customer' name="customer_id" class="initial_focus">
           <option value=""></option>
           [% FOREACH row = ALL_CUSTOMERS %]<option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.name) %]</option>
           [% END %]
          </select>
          [% ELSE %]
-         <input id='customer' name="customer" size="35">
+         <input id='customer' name="customer" size="35" class="initial_focus">
         [% END %]
        </td>
       </tr>
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
 
  </form>
-
index b8303a0..b31fde0 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[%- USE HTML %]
+[%- USE HTML %][%- USE L -%]
 <form name="Form" method="post" action="[% script %]">
 
 <table width="100%">
@@ -14,7 +14,7 @@
         <tr>
           <th align="right" nowrap>[% 'To' | $T8 %]</th>
 
-          <td><input id="email" name="email" size="30" value="[% HTML.escape(email) %]"></td>
+          <td>[% L.input_tag('email', email, size=30, class=(email ? '' : 'initial_focus')) %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Cc' | $T8 %]</th>
@@ -28,7 +28,7 @@
         <tr>
           <th align="right" nowrap>[% 'Subject' | $T8 %]</th>
 
-          <td><input id="subject" name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
+          <td>[% L.input_tag('subject', subject, size=30, class=(email ? 'initial_focus' : '')) %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Attachment name' | $T8 %]</th>
@@ -70,4 +70,3 @@
 <br>
 <input name="action" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
 </form>
-
index 658979a..23a7933 100644 (file)
@@ -51,7 +51,7 @@
             <table>
              <tr>
               <th align="right">[% 'Part Number' | $T8 %]</th>
-              <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40"></td>
+              <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40" class="initial_focus"></td>
              </tr>
              <tr>
               <th align="right">[% 'Part Description' | $T8 %]</th>
index 8c849fd..10739b6 100644 (file)
@@ -48,6 +48,7 @@
                  id            = 'vendor',
                  name          = 'vendor',
                  style         = 'width: 250px',
+                 class         = 'initial_focus',
                  DATA          = ALL_VENDORS,
                  id_sub        = 'vc_keys',
                  label_key     = 'name',
index 7aa2732..89aa3fc 100644 (file)
@@ -49,6 +49,7 @@
                  id            = 'customer',
                  name          = 'customer',
                  style         = 'width: 250px',
+                 class         = 'initial_focus',
                  DATA          = ALL_CUSTOMERS,
                  id_sub        = 'vc_keys',
                  label_key     = 'name',
index 07acdfd..671724b 100644 (file)
@@ -10,6 +10,9 @@
 [% IF error %]
      <div class="message_error_login">[% HTML.escape(error) %]</div>
 [% END %]
+[% IF warning %]
+     <div class="message_hint">[% HTML.escape(warning) %]</div>
+[% END %]
 [% IF info %]
      <div class="message_ok">[% HTML.escape(info) %]</div>
 [% END %]
@@ -26,7 +29,7 @@
           <table>
            <tr>
             <th align="right">[% 'Login Name' | $T8 %]</th>
-            <td>[% L.input_tag('{AUTH}login', '', id='auth_login', style=style) %]</td>
+            <td>[% L.input_tag('{AUTH}login', '', id='auth_login', style=style, class='initial_focus') %]</td>
            </tr>
            <tr>
             <th align="right">[% 'Password' | $T8 %]</th>
index 5b2594c..f046132 100644 (file)
@@ -26,7 +26,7 @@
     <table>
      <tr>
       <th align="right">[% 'Number' | $T8 %]</th>
-      <td>[% L.input_tag("project.projectnumber", SELF.project.projectnumber, size=60) %]</td>
+      <td>[% L.input_tag("project.projectnumber", SELF.project.projectnumber, size=60, class='initial_focus') %]</td>
      </tr>
 
      <tr>