ASP Classic blog framework - BrainOrdure
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.4KB

  1. <div class="row">
  2. <div class="col-lg-8">
  3. <div class="card shadow-sm">
  4. <div class="card-body">
  5. <h1 class="h3 mb-4">Edit Post</h1>
  6. <form method="post" action="<%= PostUpdateUrl(post.PostID) %>">
  7. <div class="mb-3">
  8. <label class="form-label" for="Title">Title</label>
  9. <input class="form-control" type="text" id="Title" name="Title" value="<%= H(post.Title) %>" required>
  10. </div>
  11. <div class="mb-3">
  12. <label class="form-label" for="Summary">Summary</label>
  13. <textarea class="form-control" id="Summary" name="Summary" rows="3"><%= H(post.Summary) %></textarea>
  14. </div>
  15. <div class="mb-3">
  16. <label class="form-label" for="Body">Body</label>
  17. <textarea class="form-control html-editor" id="Body" name="Body" rows="14" required><%= H(post.Body) %></textarea>
  18. <div class="form-text">HTML is supported. Use the editor toolbar to format the post.</div>
  19. </div>
  20. <div class="mb-4">
  21. <label class="form-label" for="CategoryID">Category ID</label>
  22. <input class="form-control" type="number" id="CategoryID" name="CategoryID" min="0" value="<%= H(post.CategoryID) %>">
  23. </div>
  24. <div class="d-flex flex-wrap gap-2">
  25. <button class="btn btn-primary" type="submit">Update Post</button>
  26. <button class="btn btn-outline-info" type="submit" formaction="<%= AdminPostAIUrl(post.PostID) %>" formmethod="post">AI Content</button>
  27. <a class="btn btn-outline-secondary" href="<%= PostsUrl() %>">Cancel</a>
  28. </div>
  29. </form>
  30. <form method="post" action="<%= PostDeleteUrl(post.PostID) %>" class="mt-3">
  31. <button class="btn btn-outline-danger" type="submit">Delete Post</button>
  32. </form>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
  38. <script>
  39. if (window.tinymce) {
  40. tinymce.init({
  41. selector: 'textarea.html-editor',
  42. menubar: false,
  43. branding: false,
  44. height: 420,
  45. plugins: 'lists link code autoresize',
  46. toolbar: 'undo redo | blocks | bold italic underline | bullist numlist | link blockquote | removeformat | code',
  47. content_style: 'body { font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 1.6; }'
  48. });
  49. }
  50. </script>

Powered by TurnKey Linux.