Skip to content

Commit b2aae13

Browse files
committed
feat(model-server): add confirmation modal to repository deletion button
1 parent c75dcf8 commit b2aae13

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

model-server/src/main/kotlin/org/modelix/model/server/handlers/ui/RepositoryOverview.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import kotlinx.html.a
1212
import kotlinx.html.form
1313
import kotlinx.html.h1
1414
import kotlinx.html.i
15+
import kotlinx.html.onClick
1516
import kotlinx.html.p
1617
import kotlinx.html.postButton
1718
import kotlinx.html.span
@@ -120,6 +121,7 @@ fun FlowContent.buildDeleteRepositoryForm(repositoryId: String) {
120121
postButton {
121122
name = "delete"
122123
formAction = "../v2/repositories/${repositoryId.encodeURLPathPart()}/delete"
124+
onClick = "return confirm('Are you sure you want to delete the repository $repositoryId?')"
123125
+"Delete Repository"
124126
}
125127
}

0 commit comments

Comments
 (0)