The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EditPost.cshtml 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @model Teknik.Areas.Blog.ViewModels.PostViewModel
  2. @using Teknik.Helpers
  3. <script>
  4. // We need to define the action URLs for the script
  5. var helpURL = '@Url.SubRouteUrl("help", "Help.Markdown")';
  6. </script>
  7. @Styles.Render("~/Content/blog")
  8. @Scripts.Render("~/bundles/blog")
  9. <div class="container">
  10. @if (Model.Error)
  11. {
  12. <div class="row">
  13. <div class="col-sm-10 col-sm-offset-1 text-center">
  14. <div class="alert alert-danger" role="alert">@Model.ErrorMessage</div>
  15. </div>
  16. </div>
  17. }
  18. <div class="row">
  19. <div class="col-sm-10 col-sm-offset-1 text-center">
  20. <h2>Edit Post</h2>
  21. </div>
  22. </div>
  23. <form class="form" action="@Url.SubRouteUrl("blog", "Blog.Action", new { action = "EditPost" })" method="post" id="newPost">
  24. <input name="postID" id="postID" type="hidden" value="@Model.PostId" />
  25. <div class="row">
  26. <div class="form-group col-sm-10 col-sm-offset-1">
  27. <label for="title"><h4>Title</h4></label>
  28. <input class="form-control" name="title" id="title" placeholder="generic click bait" title="enter a title for your post." type="text" value="@Model.Title" />
  29. </div>
  30. </div>
  31. <div class="row">
  32. <div class="form-group col-sm-10 col-sm-offset-1">
  33. <label for="article"><h4>Article</h4></label>
  34. <div class="mdd_toolbar"></div>
  35. <textarea class="form-control mdd_editor" name="article" id="article" placeholder="I ate a burger today." title="enter any information you want to share with the world." data-provide="markdown" rows="10">@Model.Article</textarea>
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col-sm-10 col-sm-offset-1">
  40. <div class="panel panel-default">
  41. <div class="panel-heading">Preview</div>
  42. <div class="panel-body">
  43. <div class="mdd_preview"></div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="row">
  49. <div class="form-group col-sm-10 col-sm-offset-1">
  50. <button type="submit" class="btn btn-primary" id="submit">Save</button>
  51. </div>
  52. </div>
  53. </form>
  54. </div>