diff --git a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy index 1a993d9a2..45d62601a 100644 --- a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy +++ b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.groovy @@ -1,11 +1,24 @@ package org.jenkinsci.plugins.github.admin.GitHubHookRegisterProblemMonitor +import hudson.util.VersionNumber +import jenkins.model.Jenkins + def f = namespace(lib.FormTagLib) -div(class: 'alert alert-warning') { - form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { - f.submit(name: 'yes', value: _('view')) - f.submit(name: 'no', value: _('dismiss')) +if (Jenkins.getVersion().isNewerThan(new VersionNumber("2.88"))) { + div(class: 'alert alert-warning') { + form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { + f.submit(name: 'yes', value: _('view')) + f.submit(name: 'no', value: _('dismiss')) + } + text(_('hook.registering.problem')) + } +} else { + div(class: 'warning') { + form(method: 'post', action: "${rootURL}/${my?.url}/act", name: my?.id) { + text(_('hook.registering.problem')) + f.submit(name: 'yes', value: _('view')) + f.submit(name: 'no', value: _('dismiss')) + } } - text(_('hook.registering.problem')) -} +} \ No newline at end of file diff --git a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties index e5907840c..cdb2c7bc3 100644 --- a/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties +++ b/src/main/resources/org/jenkinsci/plugins/github/admin/GitHubHookRegisterProblemMonitor/message.properties @@ -1,3 +1,3 @@ view=View dismiss=Dismiss -hook.registering.problem=There were some problems while registering or removing one ore more GitHub webhooks. Would you like to view the problems? +hook.registering.problem=There were some problems while registering or removing one or more GitHub webhooks. Would you like to view the problems?