diff --git a/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/BackupRestoreDataPage.html b/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/BackupRestoreDataPage.html index 715a23663b1..87e24271cbc 100644 --- a/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/BackupRestoreDataPage.html +++ b/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/BackupRestoreDataPage.html @@ -4,27 +4,12 @@ - - -
+
Archive File
@@ -38,7 +23,7 @@
-
+

issueNewBackup

Backup Options @@ -81,7 +66,7 @@

issueNewBackup -
+

issueNewRestore

Restore Options diff --git a/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/style.css b/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/style.css index c677bf36700..e9d62ef4d16 100644 --- a/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/style.css +++ b/src/community/backup-restore/web/src/main/java/org/geoserver/backuprestore/web/style.css @@ -61,4 +61,17 @@ legend span.no-border { width:100%; height:50em; font-size:small -} \ No newline at end of file +} + +.fieldset-margins fieldset { + margin-top: 3em; +} + +#sources li { + margin: 0; + padding: 0; +} + +#sources li:first-child { + margin: 0.3em 0 0; +} diff --git a/src/community/elasticsearch/src/main/java/org/geoserver/elasticsearch/ElasticConfigurationPage.java b/src/community/elasticsearch/src/main/java/org/geoserver/elasticsearch/ElasticConfigurationPage.java index 7405bb456e5..b2f7214676e 100644 --- a/src/community/elasticsearch/src/main/java/org/geoserver/elasticsearch/ElasticConfigurationPage.java +++ b/src/community/elasticsearch/src/main/java/org/geoserver/elasticsearch/ElasticConfigurationPage.java @@ -18,7 +18,9 @@ import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxButton; import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox; -import org.apache.wicket.behavior.AttributeAppender; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.OnLoadHeaderItem; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.form.DropDownChoice; @@ -293,12 +295,25 @@ protected Component getComponentForProperty( } else if (property == ElasticAttributeProvider.USE) { CheckBox checkBox = new CheckBox("use", new PropertyModel<>(itemModel, "use")); - final String onclick = - "document.getElementById(\"" + checkBox.setOutputMarkupId(true); + String script = + "document.getElementById('" + + checkBox.getMarkupId() + + "').addEventListener('click', function(event) {\n" + + " document.getElementById('" + useAllMarkupId - + "\").checked = false;"; + + "').checked = false;\n" + + "});"; checkBox.add( - new AttributeAppender("onclick", new Model<>(onclick), ";")); + new Behavior() { + + @Override + public void renderHead( + Component component, IHeaderResponse response) { + super.renderHead(component, response); + response.render(OnLoadHeaderItem.forScript(script)); + } + }); Fragment f = new Fragment(id, "checkboxUse", ElasticConfigurationPage.this); f.add(checkBox); diff --git a/src/community/security/oauth2/oauth2-web/src/main/java/org/geoserver/web/security/oauth2/GeoServerOAuth2AuthProviderPanel.html b/src/community/security/oauth2/oauth2-web/src/main/java/org/geoserver/web/security/oauth2/GeoServerOAuth2AuthProviderPanel.html index 38a53238259..cac81639b26 100644 --- a/src/community/security/oauth2/oauth2-web/src/main/java/org/geoserver/web/security/oauth2/GeoServerOAuth2AuthProviderPanel.html +++ b/src/community/security/oauth2/oauth2-web/src/main/java/org/geoserver/web/security/oauth2/GeoServerOAuth2AuthProviderPanel.html @@ -10,27 +10,6 @@ - - -
  • diff --git a/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html b/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html index fc854805363..73f496647b8 100644 --- a/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html +++ b/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html @@ -1,16 +1,6 @@ - - - - -
    diff --git a/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css b/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css index 126d6f0e31e..f93506a78fe 100644 --- a/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css +++ b/src/community/taskmanager/core/bin/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css @@ -42,4 +42,8 @@ h4 { @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } -} \ No newline at end of file +} + +.horizontal { + display: inline; +} diff --git a/src/community/taskmanager/core/src/main/java/org/geoserver/taskmanager/web/panel/FileUploadPanel.java b/src/community/taskmanager/core/src/main/java/org/geoserver/taskmanager/web/panel/FileUploadPanel.java index 8060919299c..245a56f395b 100644 --- a/src/community/taskmanager/core/src/main/java/org/geoserver/taskmanager/web/panel/FileUploadPanel.java +++ b/src/community/taskmanager/core/src/main/java/org/geoserver/taskmanager/web/panel/FileUploadPanel.java @@ -7,12 +7,13 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; -import org.apache.wicket.AttributeModifier; import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.OnLoadHeaderItem; import org.apache.wicket.markup.html.form.CheckBox; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; @@ -230,9 +231,9 @@ public void onSubmit(AjaxRequestTarget target) { @Override protected Component getContents(String id) { panel = new TextFieldPanel(id, new Model<>()); - panel.add(new PreventSubmitOnEnterBehavior()); panel.getTextField().setRequired(true); panel.setOutputMarkupId(true); + panel.add(new PreventSubmitOnEnterBehavior(panel.getMarkupId())); return panel; } @@ -262,16 +263,24 @@ public FeedbackPanel getFeedbackPanel() { public class PreventSubmitOnEnterBehavior extends Behavior { private static final long serialVersionUID = 1496517082650792177L; - public PreventSubmitOnEnterBehavior() {} + private final String id; - @Override - public void bind(Component component) { - super.bind(component); + public PreventSubmitOnEnterBehavior(String id) { + this.id = id; + } - component.add( - AttributeModifier.replace( - "onkeydown", - Model.of("if(event.keyCode == 13) {event.preventDefault();}"))); + @Override + public void renderHead(Component component, IHeaderResponse response) { + super.renderHead(component, response); + response.render( + OnLoadHeaderItem.forScript( + "document.getElementById('" + + this.id + + "').addEventListener('keydown', function(event) {\n" + + " if (event.keyCode == 13) {\n" + + " event.preventDefault();\n" + + " }\n" + + "});")); } } } diff --git a/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html b/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html index 651f1409621..79f17ac9fa6 100644 --- a/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html +++ b/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/panel/FileUploadPanel.html @@ -1,16 +1,6 @@ - - - - -
    diff --git a/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css b/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css index b179a6e0b26..a593d154617 100644 --- a/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css +++ b/src/community/taskmanager/core/src/main/resources/org/geoserver/taskmanager/web/styleTaskManager.css @@ -57,4 +57,8 @@ h4 { @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } -} \ No newline at end of file +} + +.horizontal { + display: inline; +} diff --git a/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.html b/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.html index 8135f4016d2..f43de5e56ba 100644 --- a/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.html +++ b/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.html @@ -3,19 +3,8 @@ - - -
      -
    • diff --git a/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.java b/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.java index 18bfe6813bd..587be965d54 100644 --- a/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.java +++ b/src/extension/authkey/src/main/java/org/geoserver/security/web/AuthenticationKeyFilterPanel.java @@ -13,6 +13,8 @@ import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; +import org.apache.wicket.markup.head.CssHeaderItem; +import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.CheckBox; @@ -166,6 +168,15 @@ protected void populateItem(ListItem item) { public void resetModel() {} } + @Override + public void renderHead(IHeaderResponse response) { + super.renderHead(response); + String css = " ul.horizontal div {\n" + " display:inline;\n" + " }"; + response.render( + CssHeaderItem.forCSS( + css, "org-geoserver-security-web-AuthenticationKeyFilterPanel")); + } + private ParamsPanel createParamsPanel( String id, String authKeyMapperName, Map parameters) { ParamsPanel paramsPanel = new ParamsPanel(id, authKeyMapperName, parameters); diff --git a/src/extension/authkey/src/main/java/org/geoserver/security/web/WebServiceBodyResponseUserGroupServicePanel.html b/src/extension/authkey/src/main/java/org/geoserver/security/web/WebServiceBodyResponseUserGroupServicePanel.html index ec5d7885d31..99b76e9ddd4 100644 --- a/src/extension/authkey/src/main/java/org/geoserver/security/web/WebServiceBodyResponseUserGroupServicePanel.html +++ b/src/extension/authkey/src/main/java/org/geoserver/security/web/WebServiceBodyResponseUserGroupServicePanel.html @@ -3,19 +3,8 @@ - - -