From: Moritz Bunkus Date: Tue, 18 Jun 2013 10:07:05 +0000 (+0200) Subject: Focus in Admin-Masken setzen; DB-Super-User aus Auth-DB-Konfiguration vorbelegen X-Git-Tag: release-3.1.0beta1~309^2~6 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2ae9dfb6692fffdcf15f896fb014b525fcf760eb;p=kivitendo-erp.git Focus in Admin-Masken setzen; DB-Super-User aus Auth-DB-Konfiguration vorbelegen --- diff --git a/SL/Controller/Admin.pm b/SL/Controller/Admin.pm index ac4aca5bc..d633b98ca 100644 --- a/SL/Controller/Admin.pm +++ b/SL/Controller/Admin.pm @@ -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); } diff --git a/templates/webpages/admin/adminlogin.html b/templates/webpages/admin/adminlogin.html index 263bef8dc..8c0d82158 100644 --- a/templates/webpages/admin/adminlogin.html +++ b/templates/webpages/admin/adminlogin.html @@ -24,7 +24,7 @@ - +
[% 'Password' | $T8 %][%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30") %][%- L.input_tag("{AUTH}admin_password", '', type="password", class="login", id="admin_password", size="30", class="initial_focus") %]
diff --git a/templates/webpages/admin/check_auth_database.html b/templates/webpages/admin/check_auth_database.html index 2a3c51d9f..80f0698ff 100644 --- a/templates/webpages/admin/check_auth_database.html +++ b/templates/webpages/admin/check_auth_database.html @@ -34,7 +34,7 @@ [% 'Please enter the name of the database that will be used as the template for the new database:' | $T8 %]

-

[% 'Template database' | $T8 %]:

+

[% 'Template database' | $T8 %]: [% L.input_tag('db_template', "template1") %]

[% '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,12 +43,12 @@ - + - +
[% 'Superuser name' | $T8 %]:[% L.input_tag('db_superuser', '') %][% L.input_tag('db_superuser', AUTH.DB_config.user, class="initial_focus") %]
[% 'Password' | $T8 %]:[% L.input_tag('db_superuser_password', '', type='password') %][% L.input_tag('db_superuser_password', AUTH.DB_config.password, type='password') %]
diff --git a/templates/webpages/admin/create_dataset.html b/templates/webpages/admin/create_dataset.html index 220ed845b..8b999f039 100644 --- a/templates/webpages/admin/create_dataset.html +++ b/templates/webpages/admin/create_dataset.html @@ -20,7 +20,7 @@ [% LxERP.t8('Create Dataset') %] - [% L.input_tag('db', FORM.db) %] + [% L.input_tag('db', FORM.db, class="initial_focus") %] diff --git a/templates/webpages/admin/dbadmin.html b/templates/webpages/admin/dbadmin.html index a0e91a748..dc0a2142d 100644 --- a/templates/webpages/admin/dbadmin.html +++ b/templates/webpages/admin/dbadmin.html @@ -10,7 +10,7 @@ - + diff --git a/templates/webpages/admin/delete_dataset.html b/templates/webpages/admin/delete_dataset.html index b32f1ed8b..e27657e6c 100644 --- a/templates/webpages/admin/delete_dataset.html +++ b/templates/webpages/admin/delete_dataset.html @@ -16,7 +16,7 @@

[% 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") %]

[% L.hidden_tag("dbhost", FORM.dbhost) %] diff --git a/templates/webpages/admin/edit_client.html b/templates/webpages/admin/edit_client.html index e6cacaa9d..8dd32986f 100644 --- a/templates/webpages/admin/edit_client.html +++ b/templates/webpages/admin/edit_client.html @@ -23,7 +23,7 @@ - + @@ -33,22 +33,22 @@ - +
[% LxERP.t8('Host') %][% L.input_tag('dbhost', FORM.dbhost, size=30) %][% L.input_tag('dbhost', FORM.dbhost, size=30, class="initial_focus") %] [% LxERP.t8('Port') %] [% L.input_tag('dbport', FORM.dbport, size=6) %]
[% LxERP.t8('Client name') %][% L.input_tag("client.name", SELF.client.name) %][% L.input_tag("client.name", SELF.client.name, class="initial_focus") %]
[% LxERP.t8('Database name') %][% L.input_tag("client.dbname", SELF.client.dbname, 'data-dbsettings'=1) %][% L.input_tag("client.dbname", SELF.client.dbname, class="contains_dbsettings") %]
[% LxERP.t8('Database host and port') %] - [% 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) %]
[% LxERP.t8('Database user and password') %] - [% 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") %]
@@ -127,7 +127,7 @@ 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' }); diff --git a/templates/webpages/admin/edit_group.html b/templates/webpages/admin/edit_group.html index 78e1fb685..6313717f6 100644 --- a/templates/webpages/admin/edit_group.html +++ b/templates/webpages/admin/edit_group.html @@ -16,7 +16,7 @@ - + @@ -33,12 +33,12 @@ [% 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 %] -

[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='[data-checkallgroup=' _ section_number _ ']', checked=(num_checked == section.rights.size)) %]

+

[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='[.checkallgroup' _ section_number _ ']', checked=(num_checked == section.rights.size)) %]

[% 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) %]
[%- END %]
diff --git a/templates/webpages/admin/edit_printer.html b/templates/webpages/admin/edit_printer.html index 8e2f5a224..7064416eb 100644 --- a/templates/webpages/admin/edit_printer.html +++ b/templates/webpages/admin/edit_printer.html @@ -12,7 +12,7 @@
[% LxERP.t8('Name') %][% L.input_tag("group.name", SELF.group.name) %][% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]
- + diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index f8154bf07..b8b5dc4df 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.html @@ -20,7 +20,7 @@
[% LxERP.t8('Printer Description') %][% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30) %][% L.input_tag("printer.printer_description", SELF.printer.printer_description, size=30, class="initial_focus") %]
[% LxERP.t8('Printer Command') %]
- + [%- IF AUTH.can_change_password %]
[% LxERP.t8('Login Name') %][% L.input_tag("user.login", SELF.user.login) %][% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]