Add radio input in order to select the export format
This commit is contained in:
parent
ad97ba029e
commit
a7c8e63b11
@ -26,14 +26,31 @@ class SettingView(staticFileResolver: StaticFileResolver) : View(staticFileResol
|
||||
}
|
||||
}
|
||||
|
||||
section("m-4 p-4 bg-gray-800 rounded") {
|
||||
p(classes = "mb-4") {
|
||||
+"Export all my data"
|
||||
section("m-4 p-4 bg-gray-800 rounded flex justify-around") {
|
||||
|
||||
form(method = FormMethod.post, action = "/export") {
|
||||
button(name = "display",
|
||||
classes = "inline btn btn-teal block",
|
||||
type = submit) { +"Display my data" }
|
||||
}
|
||||
|
||||
form(method = FormMethod.post, action = "/export") {
|
||||
button(name = "display", classes = "inline btn btn-teal block", type = submit) { +"Display my data" }
|
||||
button(name = "download", classes = "inline btn btn-green block ml-2 mt-2", type = submit) {
|
||||
|
||||
listOf("json", "zip").forEach { format ->
|
||||
div {
|
||||
radioInput(name = "format") {
|
||||
id = format
|
||||
attributes["value"] = format
|
||||
if(format == "json") attributes["checked"] = ""
|
||||
}
|
||||
label(classes = "ml-2") {
|
||||
attributes["for"] = format
|
||||
+format
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button(name = "download", classes = "inline btn btn-green block mt-2", type = submit) {
|
||||
+"Download my data"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user