From 95808a3cfde46bdfd345de21d44a222051cf71ba Mon Sep 17 00:00:00 2001
From: Gergely Nagy <forgejo@gergo.csillger.hu>
Date: Tue, 28 May 2024 08:53:31 +0200
Subject: [PATCH] install: Make "Disable self-registration" more prominent

Having an instance with open registration requires work, otherwise it
will be overrun by spammers of all kinds. Yet, the setting to disable
open registration on the installation page is hidden behind "optional
settings", a place hardly anyone ever looks.

To improve the situation, lift the setting out of that, and place it
more prominently, just above the update checker setting.

Partially addresses #3925.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
---
 templates/install.tmpl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/templates/install.tmpl b/templates/install.tmpl
index 682e1e6511..6e537d2477 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -147,6 +147,12 @@
 						<input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required>
 						<span class="help">{{ctx.Locale.Tr "install.log_root_path_helper"}}</span>
 					</div>
+					<div class="inline field">
+						<div class="ui checkbox" id="disable-registration">
+							<label data-tooltip-content="{{ctx.Locale.Tr "install.disable_registration_popup"}}">{{ctx.Locale.Tr "install.disable_registration"}}</label>
+							<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
+						</div>
+					</div>
 					<div class="inline field">
 						<div class="ui checkbox">
 							<label>{{ctx.Locale.Tr "install.enable_update_checker"}}</label>
@@ -227,12 +233,6 @@
 								<input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}>
 							</div>
 						</div>
-						<div class="inline field">
-							<div class="ui checkbox" id="disable-registration">
-								<label data-tooltip-content="{{ctx.Locale.Tr "install.disable_registration_popup"}}">{{ctx.Locale.Tr "install.disable_registration"}}</label>
-								<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
-							</div>
-						</div>
 						<div class="inline field">
 							<div class="ui checkbox" id="allow-only-external-registration">
 								<label data-tooltip-content="{{ctx.Locale.Tr "install.allow_only_external_registration_popup"}}">{{ctx.Locale.Tr "install.allow_only_external_registration_popup"}}</label>