diff --git a/src/main/scala/app/SystemSettingsController.scala b/src/main/scala/app/SystemSettingsController.scala index 27b18fa..57e4eb3 100644 --- a/src/main/scala/app/SystemSettingsController.scala +++ b/src/main/scala/app/SystemSettingsController.scala @@ -21,6 +21,7 @@ private val form = mapping( "baseUrl" -> trim(label("Base URL", optional(text()))), + "information" -> trim(label("Information", optional(text()))), "allowAccountRegistration" -> trim(label("Account registration", boolean())), "gravatar" -> trim(label("Gravatar", boolean())), "notification" -> trim(label("Notification", boolean())), diff --git a/src/main/scala/service/SystemSettingsService.scala b/src/main/scala/service/SystemSettingsService.scala index 9fbd78f..63f9ad1 100644 --- a/src/main/scala/service/SystemSettingsService.scala +++ b/src/main/scala/service/SystemSettingsService.scala @@ -12,6 +12,7 @@ def saveSystemSettings(settings: SystemSettings): Unit = { defining(new java.util.Properties()){ props => settings.baseUrl.foreach(x => props.setProperty(BaseURL, x.replaceFirst("/\\Z", ""))) + settings.information.foreach(x => props.setProperty(Information, x)) props.setProperty(AllowAccountRegistration, settings.allowAccountRegistration.toString) props.setProperty(Gravatar, settings.gravatar.toString) props.setProperty(Notification, settings.notification.toString) @@ -60,6 +61,7 @@ } SystemSettings( getOptionValue[String](props, BaseURL, None).map(x => x.replaceFirst("/\\Z", "")), + getOptionValue[String](props, Information, None), getValue(props, AllowAccountRegistration, false), getValue(props, Gravatar, true), getValue(props, Notification, false), @@ -105,6 +107,7 @@ case class SystemSettings( baseUrl: Option[String], + information: Option[String], allowAccountRegistration: Boolean, gravatar: Boolean, notification: Boolean, @@ -147,6 +150,7 @@ val DefaultLdapPort = 389 private val BaseURL = "base_url" + private val Information = "information" private val AllowAccountRegistration = "allow_account_registration" private val Gravatar = "gravatar" private val Notification = "notification" diff --git a/src/main/twirl/admin/system.scala.html b/src/main/twirl/admin/system.scala.html index 3ef154f..9379672 100644 --- a/src/main/twirl/admin/system.scala.html +++ b/src/main/twirl/admin/system.scala.html @@ -31,6 +31,14 @@ You can use this property to adjust URL difference between the reverse proxy and GitBucket.
+ + +