瀏覽代碼

Fix post edit form action

master
Nano 6 天之前
父節點
當前提交
c8e4b3de78
共有 2 個檔案被更改,包括 5 行新增1 行删除
  1. +1
    -1
      app/views/Posts/edit.asp
  2. +4
    -0
      core/helpers.asp

+ 1
- 1
app/views/Posts/edit.asp 查看文件

@@ -4,7 +4,7 @@
<div class="card-body">
<h1 class="h3 mb-4">Edit Post</h1>
<form method="post" action="<%= PostEditUrl(post.PostID) %>">
<form method="post" action="<%= PostUpdateUrl(post.PostID) %>">
<div class="mb-3">
<label class="form-label" for="Title">Title</label>
<input class="form-control" type="text" id="Title" name="Title" value="<%= H(post.Title) %>" required>


+ 4
- 0
core/helpers.asp 查看文件

@@ -267,6 +267,10 @@ Function PostEditUrl(ByVal postId)
PostEditUrl = "/posts/" & Server.URLEncode(CStr(postId)) & "/edit"
End Function

Function PostUpdateUrl(ByVal postId)
PostUpdateUrl = "/posts/" & Server.URLEncode(CStr(postId))
End Function

Function PostDeleteUrl(ByVal postId)
PostDeleteUrl = "/posts/" & Server.URLEncode(CStr(postId)) & "/delete"
End Function


Loading…
取消
儲存

Powered by TurnKey Linux.