]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Focus in Admin-Masken setzen; DB-Super-User aus Auth-DB-Konfiguration vorbelegen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 18 Jun 2013 10:07:05 +0000 (12:07 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 18 Jun 2013 10:07:31 +0000 (12:07 +0200)
SL/Controller/Admin.pm
templates/webpages/admin/adminlogin.html
templates/webpages/admin/check_auth_database.html
templates/webpages/admin/create_dataset.html
templates/webpages/admin/dbadmin.html
templates/webpages/admin/delete_dataset.html
templates/webpages/admin/edit_client.html
templates/webpages/admin/edit_group.html
templates/webpages/admin/edit_printer.html
templates/webpages/admin/edit_user.html

index ac4aca5bc974a4c56a56df8b93fda08fb62f6dee..d633b98ca30e5a6c24c6f7e1e1c88b5d505d5976 100644 (file)
@@ -375,8 +375,6 @@ sub action_database_administration {
   $::form->{dbpasswd}  ||= $::auth->{DB_config}->{password};
   $::form->{dbdefault} ||= 'template1';
 
-  $::request->layout->focus('#dbhost');
-
   $self->render('admin/dbadmin', title => t8('Database Administration'));
 }
 
@@ -547,7 +545,6 @@ sub use_multiselect_js {
 
 sub login_form {
   my ($self, %params) = @_;
-  $::request->layout->focus('#admin_password');
   $self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $::form->read_version), %params);
 }
 
index 263bef8dc3fb66bf096c13f6a4d17d527759c8aa..8c0d821586a8a03e249bbfd90dad4fbdd4fccd85 100644 (file)
@@ -24,7 +24,7 @@
           <table>
            <tr>
             <th align="right">[% 'Password' | $T8 %]</th>
-            <td>[%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30") %]</td>
+            <td>[%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30", class="initial_focus") %]</td>
            </tr>
           </table>
 
index 2a3c51d9f3cf2d1c8877f7eede17472561922157..80f0698ff7182d869ed3d7a363986df8926eb04a 100644 (file)
@@ -34,7 +34,7 @@
    [% 'Please enter the name of the database that will be used as the template for the new database:' | $T8 %]
   </p>
 
-  <p>[% 'Template database' | $T8 %]: <input name="db_template" value="template1"></p>
+  <p>[% 'Template database' | $T8 %]: [% L.input_tag('db_template', "template1") %]</p>
 
   <p>
    [% '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 %]
   <table border="0">
    <tr>
     <td>[% 'Superuser name' | $T8 %]:</td>
-    <td>[% L.input_tag('db_superuser', '') %]</td>
+    <td>[% L.input_tag('db_superuser', AUTH.DB_config.user, class="initial_focus") %]</td>
    </tr>
 
    <tr>
     <td>[% 'Password' | $T8 %]:</td>
-    <td>[% L.input_tag('db_superuser_password', '', type='password') %]</td>
+    <td>[% L.input_tag('db_superuser_password', AUTH.DB_config.password, type='password') %]</td>
    </tr>
   </table>
 
index 220ed845b8e065c8b914a4d9fc41f35b8148d0a7..8b999f0392d91d4c091909e277ec78f06ac12f83 100644 (file)
@@ -20,7 +20,7 @@
 
   <tr>
    <th align="right" nowrap>[% LxERP.t8('Create Dataset') %]</th>
-   <td>[% L.input_tag('db', FORM.db) %]</td>
+   <td>[% L.input_tag('db', FORM.db, class="initial_focus") %]</td>
   </tr>
 
   <tr>
index a0e91a748afac48f34c0fed244d654e4722fffde..dc0a2142d1a9e4414a09ea1ffc64265b387bc30f 100644 (file)
@@ -10,7 +10,7 @@
  <table>
   <tr>
    <th align="right">[% LxERP.t8('Host') %]</th>
-   <td>[% L.input_tag('dbhost', FORM.dbhost, size=30) %]</td>
+   <td>[% L.input_tag('dbhost', FORM.dbhost, size=30, class="initial_focus") %]</td>
    <th align="right">[% LxERP.t8('Port') %]</th>
    <td>[% L.input_tag('dbport', FORM.dbport, size=6) %]</td>
   </tr>
index b32f1ed8b36aaa4e4944d0f8bce7c5e41d555fd2..e27657e6c44d2a274082b3ddd896b59fabc9ad0f 100644 (file)
@@ -16,7 +16,7 @@
 <form method="post" action="controller.pl">
  <p>
   [% LxERP.t8('Please select the dataset you want to delete:') %]
-  [% L.select_tag('db', SELF.all_unused_dbsources) %]
+  [% L.select_tag('db', SELF.all_unused_dbsources, class="initial_focus") %]
  </p>
 
  [% L.hidden_tag("dbhost", FORM.dbhost) %]
index e6cacaa9d8dfcdf1ca3d8a02adaaa8c814fecb5a..8dd32986f4405376b297970fdef66036f37156b2 100644 (file)
@@ -23,7 +23,7 @@
 
   <tr>
    <th align="right">[% LxERP.t8('Client name') %]</th>
-   <td>[% L.input_tag("client.name", SELF.client.name) %]</td>
+   <td>[% L.input_tag("client.name", SELF.client.name, class="initial_focus") %]</td>
   </tr>
 
   <tr>
 
   <tr>
    <th align="right">[% LxERP.t8('Database name') %]</th>
-   <td>[% L.input_tag("client.dbname", SELF.client.dbname, 'data-dbsettings'=1) %]</td>
+   <td>[% L.input_tag("client.dbname", SELF.client.dbname, class="contains_dbsettings") %]</td>
   </tr>
 
   <tr>
    <th align="right">[% LxERP.t8('Database host and port') %]</th>
    <td>
-    [% L.input_tag("client.dbhost", SELF.client.dbhost, 'data-dbsettings'=1) %]
-    [% L.input_tag("client.dbport", SELF.client.dbport, 'data-dbsettings'=1, size=6) %]
+    [% L.input_tag("client.dbhost", SELF.client.dbhost, class="contains_dbsettings") %]
+    [% L.input_tag("client.dbport", SELF.client.dbport, class="contains_dbsettings", size=6) %]
    </td>
   </tr>
 
   <tr>
    <th align="right">[% LxERP.t8('Database user and password') %]</th>
    <td>
-    [% L.input_tag("client.dbuser",   SELF.client.dbuser, 'data-dbsettings'=1) %]
-    [% L.input_tag("client.dbpasswd", SELF.client.dbpasswd, 'data-dbsettings'=1) %]
+    [% L.input_tag("client.dbuser",   SELF.client.dbuser, class="contains_dbsettings") %]
+    [% L.input_tag("client.dbpasswd", SELF.client.dbpasswd, class="contains_dbsettings") %]
    </td>
   </tr>
  </table>
   function test_database_connectivity() {
     open_jqm_window({
       url:  'controller.pl?action=Admin/test_database_connectivity',
-      data: $("INPUT[data-dbsettings=1]").serialize(),
+      data: $(".contains_dbsettings]").serialize(),
       type: 'POST',
       id:   'test_db_connection_window'
     });
index 78e1fb6859ea9325e6dab5316d859ca79d025615..6313717f69e076ed15b356b1c5aab73a93a37e63 100644 (file)
@@ -16,7 +16,7 @@
  <table>
   <tr>
    <th align="right">[% LxERP.t8('Name') %]</th>
-   <td>[% L.input_tag("group.name", SELF.group.name) %]</td>
+   <td>[% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]</td>
   </tr>
 
   <tr>
   [% SET section_number = loop.count %]
   [% SET num_checked = 0 %]
   [% FOREACH right = section.rights %][% SET name = right.name %][% IF granted_rights.$name %][% SET num_checked = num_checked + 1 %][% END %][% END %]
-  <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>
+  <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>
 
   <div class="clearfix">
    [% FOREACH right = section.rights %]
     [% SET name = right.name %]
-    [% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, 'data-checkallgroup'=section_number) %]
+    [% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, class="checkallgroup" _ section_number) %]
     <br>
    [%- END %]
   </div>
index 8e2f5a224890093e07be17c3b426971afbe2be1f..7064416eba217f20dcdc664b0cd39783b5df6d17 100644 (file)
@@ -12,7 +12,7 @@
  <table>
   <tr>
    <th align="right">[% LxERP.t8('Printer Description') %]</th>
-   <td>[% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30) %]</td>
+   <td>[% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30, class="initial_focus") %]</td>
   <tr>
   <tr>
    <th align="right">[% LxERP.t8('Printer Command') %]</th>
index f8154bf07f4aebbc4b02a07e01328016a31693b4..b8b5dc4df6009f3984597866f6a256e79714d82d 100644 (file)
@@ -20,7 +20,7 @@
     <table>
      <tr>
       <th align="right">[% LxERP.t8('Login Name') %]</th>
-      <td>[% L.input_tag("user.login", SELF.user.login) %]</td>
+      <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]</td>
      </tr>
 
      [%- IF AUTH.can_change_password %]