Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2ae9dfb6

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 2ae9dfb6692fffdcf15f896fb014b525fcf760eb
  • Vorgänger e92b111d
  • Nachfolger e2f3e23d

Focus in Admin-Masken setzen; DB-Super-User aus Auth-DB-Konfiguration vorbelegen

Unterschiede anzeigen:

SL/Controller/Admin.pm
375 375
  $::form->{dbpasswd}  ||= $::auth->{DB_config}->{password};
376 376
  $::form->{dbdefault} ||= 'template1';
377 377

  
378
  $::request->layout->focus('#dbhost');
379

  
380 378
  $self->render('admin/dbadmin', title => t8('Database Administration'));
381 379
}
382 380

  
......
547 545

  
548 546
sub login_form {
549 547
  my ($self, %params) = @_;
550
  $::request->layout->focus('#admin_password');
551 548
  $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $::form->read_version), %params);
552 549
}
553 550

  
templates/webpages/admin/adminlogin.html
24 24
          <table>
25 25
           <tr>
26 26
            <th align="right">[% 'Password' | $T8 %]</th>
27
            <td>[%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30") %]</td>
27
            <td>[%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30", class="initial_focus") %]</td>
28 28
           </tr>
29 29
          </table>
30 30

  
templates/webpages/admin/check_auth_database.html
34 34
   [% 'Please enter the name of the database that will be used as the template for the new database:' | $T8 %]
35 35
  </p>
36 36

  
37
  <p>[% 'Template database' | $T8 %]: <input name="db_template" value="template1"></p>
37
  <p>[% 'Template database' | $T8 %]: [% L.input_tag('db_template', "template1") %]</p>
38 38

  
39 39
  <p>
40 40
   [% 'If the database user listed above does not have the right to create a database then enter the name and password of the superuser below:' | $T8 %]
......
43 43
  <table border="0">
44 44
   <tr>
45 45
    <td>[% 'Superuser name' | $T8 %]:</td>
46
    <td>[% L.input_tag('db_superuser', '') %]</td>
46
    <td>[% L.input_tag('db_superuser', AUTH.DB_config.user, class="initial_focus") %]</td>
47 47
   </tr>
48 48

  
49 49
   <tr>
50 50
    <td>[% 'Password' | $T8 %]:</td>
51
    <td>[% L.input_tag('db_superuser_password', '', type='password') %]</td>
51
    <td>[% L.input_tag('db_superuser_password', AUTH.DB_config.password, type='password') %]</td>
52 52
   </tr>
53 53
  </table>
54 54

  
templates/webpages/admin/create_dataset.html
20 20

  
21 21
  <tr>
22 22
   <th align="right" nowrap>[% LxERP.t8('Create Dataset') %]</th>
23
   <td>[% L.input_tag('db', FORM.db) %]</td>
23
   <td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
24 24
  </tr>
25 25

  
26 26
  <tr>
templates/webpages/admin/dbadmin.html
10 10
 <table>
11 11
  <tr>
12 12
   <th align="right">[% LxERP.t8('Host') %]</th>
13
   <td>[% L.input_tag('dbhost', FORM.dbhost, size=30) %]</td>
13
   <td>[% L.input_tag('dbhost', FORM.dbhost, size=30, class="initial_focus") %]</td>
14 14
   <th align="right">[% LxERP.t8('Port') %]</th>
15 15
   <td>[% L.input_tag('dbport', FORM.dbport, size=6) %]</td>
16 16
  </tr>
templates/webpages/admin/delete_dataset.html
16 16
<form method="post" action="controller.pl">
17 17
 <p>
18 18
  [% LxERP.t8('Please select the dataset you want to delete:') %]
19
  [% L.select_tag('db', SELF.all_unused_dbsources) %]
19
  [% L.select_tag('db', SELF.all_unused_dbsources, class="initial_focus") %]
20 20
 </p>
21 21

  
22 22
 [% L.hidden_tag("dbhost", FORM.dbhost) %]
templates/webpages/admin/edit_client.html
23 23

  
24 24
  <tr>
25 25
   <th align="right">[% LxERP.t8('Client name') %]</th>
26
   <td>[% L.input_tag("client.name", SELF.client.name) %]</td>
26
   <td>[% L.input_tag("client.name", SELF.client.name, class="initial_focus") %]</td>
27 27
  </tr>
28 28

  
29 29
  <tr>
......
33 33

  
34 34
  <tr>
35 35
   <th align="right">[% LxERP.t8('Database name') %]</th>
36
   <td>[% L.input_tag("client.dbname", SELF.client.dbname, 'data-dbsettings'=1) %]</td>
36
   <td>[% L.input_tag("client.dbname", SELF.client.dbname, class="contains_dbsettings") %]</td>
37 37
  </tr>
38 38

  
39 39
  <tr>
40 40
   <th align="right">[% LxERP.t8('Database host and port') %]</th>
41 41
   <td>
42
    [% L.input_tag("client.dbhost", SELF.client.dbhost, 'data-dbsettings'=1) %]
43
    [% L.input_tag("client.dbport", SELF.client.dbport, 'data-dbsettings'=1, size=6) %]
42
    [% L.input_tag("client.dbhost", SELF.client.dbhost, class="contains_dbsettings") %]
43
    [% L.input_tag("client.dbport", SELF.client.dbport, class="contains_dbsettings", size=6) %]
44 44
   </td>
45 45
  </tr>
46 46

  
47 47
  <tr>
48 48
   <th align="right">[% LxERP.t8('Database user and password') %]</th>
49 49
   <td>
50
    [% L.input_tag("client.dbuser",   SELF.client.dbuser, 'data-dbsettings'=1) %]
51
    [% L.input_tag("client.dbpasswd", SELF.client.dbpasswd, 'data-dbsettings'=1) %]
50
    [% L.input_tag("client.dbuser",   SELF.client.dbuser, class="contains_dbsettings") %]
51
    [% L.input_tag("client.dbpasswd", SELF.client.dbpasswd, class="contains_dbsettings") %]
52 52
   </td>
53 53
  </tr>
54 54
 </table>
......
127 127
  function test_database_connectivity() {
128 128
    open_jqm_window({
129 129
      url:  'controller.pl?action=Admin/test_database_connectivity',
130
      data: $("INPUT[data-dbsettings=1]").serialize(),
130
      data: $(".contains_dbsettings]").serialize(),
131 131
      type: 'POST',
132 132
      id:   'test_db_connection_window'
133 133
    });
templates/webpages/admin/edit_group.html
16 16
 <table>
17 17
  <tr>
18 18
   <th align="right">[% LxERP.t8('Name') %]</th>
19
   <td>[% L.input_tag("group.name", SELF.group.name) %]</td>
19
   <td>[% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]</td>
20 20
  </tr>
21 21

  
22 22
  <tr>
......
33 33
  [% SET section_number = loop.count %]
34 34
  [% SET num_checked = 0 %]
35 35
  [% FOREACH right = section.rights %][% SET name = right.name %][% IF granted_rights.$name %][% SET num_checked = num_checked + 1 %][% END %][% END %]
36
  <h3>[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='[data-checkallgroup=' _ section_number _ ']', checked=(num_checked == section.rights.size)) %]</h3>
36
  <h3>[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='[.checkallgroup' _ section_number _ ']', checked=(num_checked == section.rights.size)) %]</h3>
37 37

  
38 38
  <div class="clearfix">
39 39
   [% FOREACH right = section.rights %]
40 40
    [% SET name = right.name %]
41
    [% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, 'data-checkallgroup'=section_number) %]
41
    [% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, class="checkallgroup" _ section_number) %]
42 42
    <br>
43 43
   [%- END %]
44 44
  </div>
templates/webpages/admin/edit_printer.html
12 12
 <table>
13 13
  <tr>
14 14
   <th align="right">[% LxERP.t8('Printer Description') %]</th>
15
   <td>[% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30) %]</td>
15
   <td>[% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30, class="initial_focus") %]</td>
16 16
  <tr>
17 17
  <tr>
18 18
   <th align="right">[% LxERP.t8('Printer Command') %]</th>
templates/webpages/admin/edit_user.html
20 20
    <table>
21 21
     <tr>
22 22
      <th align="right">[% LxERP.t8('Login Name') %]</th>
23
      <td>[% L.input_tag("user.login", SELF.user.login) %]</td>
23
      <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]</td>
24 24
     </tr>
25 25

  
26 26
     [%- IF AUTH.can_change_password %]

Auch abrufbar als: Unified diff