diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 9278e7c28b..9bbd11f027 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -99,9 +99,9 @@ {{ctx.Locale.Tr "remove"}} - + {{if .IsAttachmentEnabled}}
{{template "repo/upload" .}} @@ -111,32 +111,28 @@
- {{if not .PageIsEditRelease}} -
-
+
+ {{if not .PageIsEditRelease}} +
-
- {{else}} - - {{end}} -
-
+ {{ctx.Locale.Tr "repo.release.add_tag_msg"}} + + {{else}} + + {{end}} +
-
- {{ctx.Locale.Tr "repo.release.prerelease_helper"}} - {{if not .DisableDownloadSourceArchives}} -
-
+ {{ctx.Locale.Tr "repo.release.prerelease_desc"}} + {{ctx.Locale.Tr "repo.release.prerelease_helper"}} + + {{if not .DisableDownloadSourceArchives}} +
-
- {{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}} - {{end}} + {{ctx.Locale.Tr "repo.release.hide_archive_links"}} + {{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}} + + {{end}} +
{{if .PageIsEditRelease}} diff --git a/tests/e2e/release.test.e2e.js b/tests/e2e/release.test.e2e.js index cf39ff2f2e..ac1e101f98 100644 --- a/tests/e2e/release.test.e2e.js +++ b/tests/e2e/release.test.e2e.js @@ -1,6 +1,7 @@ // @ts-check import {expect} from '@playwright/test'; import {test, login_user, save_visual, load_logged_in_context} from './utils_e2e.js'; +import {validate_form} from './shared/forms.js'; test.beforeAll(async ({browser}, workerInfo) => { await login_user(browser, workerInfo, 'user2'); @@ -23,6 +24,7 @@ test('External Release Attachments', async ({browser, isMobile}, workerInfo) => // Fill out form and create new release await expect(page).toHaveURL('/user2/repo2/releases/new'); + await validate_form({page}, 'fieldset'); await page.fill('input[name=tag_name]', '2.0'); await page.fill('input[name=title]', '2.0'); await page.click('#add-external-link'); @@ -43,6 +45,7 @@ test('External Release Attachments', async ({browser, isMobile}, workerInfo) => // Validate edit page and edit the release await expect(page).toHaveURL('/user2/repo2/releases/edit/2.0'); + await validate_form({page}, 'fieldset'); await expect(page.locator('.attachment_edit:visible')).toHaveCount(2); await expect(page.locator('.attachment_edit:visible').nth(0)).toHaveValue('Test'); await expect(page.locator('.attachment_edit:visible').nth(1)).toHaveValue('https://forgejo.org/'); diff --git a/web_src/css/form.css b/web_src/css/form.css index e0e2952080..a8867009bc 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -10,6 +10,7 @@ fieldset legend { fieldset label { display: block; + margin-bottom: 0.6em; } fieldset label:has(input[type="text"]), @@ -19,7 +20,11 @@ fieldset label:has(input[type="number"]) { fieldset .help { font-weight: var(--font-weight-normal); - display: block !important; /* overrides another rule in this file, remove when obsolete */ +} + +.form fieldset .help { /* overrides other .form .help rules in this file, remove when obsolete */ + display: block !important; + padding-bottom: 0; } fieldset input[type="checkbox"], diff --git a/web_src/css/repo/release-tag.css b/web_src/css/repo/release-tag.css index 429a4690a4..9860813e98 100644 --- a/web_src/css/repo/release-tag.css +++ b/web_src/css/repo/release-tag.css @@ -99,10 +99,6 @@ padding-bottom: 10px; } -.repository.new.release .prerelease.field { - margin-bottom: 0; -} - @media (max-width: 438px) { .repository.new.release .field button, .repository.new.release .field input {