Kaynağa Gözat

Fix post edit form action

master
Nano 6 gün önce
ebeveyn
işleme
c8e4b3de78
2 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. +1
    -1
      app/views/Posts/edit.asp
  2. +4
    -0
      core/helpers.asp

+ 1
- 1
app/views/Posts/edit.asp Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet

Powered by TurnKey Linux.