Bläddra i källkod

Fix post edit form action

master
Nano 6 dagar sedan
förälder
incheckning
c8e4b3de78
2 ändrade filer med 5 tillägg och 1 borttagningar
  1. +1
    -1
      app/views/Posts/edit.asp
  2. +4
    -0
      core/helpers.asp

+ 1
- 1
app/views/Posts/edit.asp Visa fil

@@ -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 Visa fil

@@ -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


Laddar…
Avbryt
Spara

Powered by TurnKey Linux.