diff --git a/src/main/scala/app/CreateRepositoryController.scala b/src/main/scala/app/CreateRepositoryController.scala index 595f5cb..22d405e 100644 --- a/src/main/scala/app/CreateRepositoryController.scala +++ b/src/main/scala/app/CreateRepositoryController.scala @@ -16,11 +16,11 @@ */ trait CreateRepositoryControllerBase extends ControllerBase { self: RepositoryService with WikiService => - case class RepositoryCreationForm(name: String, description: String) // TODO Option? + case class RepositoryCreationForm(name: String, description: Option[String]) val form = mapping( "name" -> trim(label("Repository name", text(required, maxlength(40), repository))), - "description" -> trim(label("Description" , text())) + "description" -> trim(label("Description" , optional(text()))) )(RepositoryCreationForm.apply) /** @@ -37,7 +37,7 @@ val loginUserName = context.loginAccount.get.userName // Insert to the database at first - createRepository(form.name, loginUserName, Some(form.description)) + createRepository(form.name, loginUserName, form.description) // Create the actual repository val gitdir = getRepositoryDir(loginUserName, form.name) diff --git a/src/main/twirl/index.scala.html b/src/main/twirl/index.scala.html index 5994784..b0eae5d 100644 --- a/src/main/twirl/index.scala.html +++ b/src/main/twirl/index.scala.html @@ -9,7 +9,9 @@ / @repository.name -