Pārlūkot izejas kodu

Fix post edit form action

master
Nano pirms 6 dienas
vecāks
revīzija
c8e4b3de78
2 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      app/views/Posts/edit.asp
  2. +4
    -0
      core/helpers.asp

+ 1
- 1
app/views/Posts/edit.asp Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt

Powered by TurnKey Linux.