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.

Settings.cshtml 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @model Teknik.Areas.Profile.ViewModels.SettingsViewModel
  2. @using Teknik.Helpers
  3. <script>
  4. var homeUrl = '@Url.SubRouteUrl("www", "Home.Index")';
  5. var editUserURL = '@Url.SubRouteUrl("profile", "Profile.Action", new { action = "Edit" })';
  6. var deleteUserURL = '@Url.SubRouteUrl("profile", "Profile.Action", new { action = "Delete" })';
  7. </script>
  8. @Styles.Render("~/Content/profile")
  9. @Scripts.Render("~/bundles/profile")
  10. <div class="container">
  11. @if (!Model.Error)
  12. {
  13. <div class="row">
  14. <div class="col-sm-12">
  15. <form class="form" action="##" method="post" id="updateForm">
  16. <input name="update_userid" id="update_userid" type="hidden" value="@Model.UserID" />
  17. <!-- Profile Settings -->
  18. <div class="row">
  19. <div class="col-sm-12 text-center">
  20. <h3>Profile Settings</h3>
  21. </div>
  22. </div>
  23. <hr>
  24. <div class="row">
  25. <div class="form-group col-sm-4">
  26. <label for="update_password_current"><h4>Current Password</h4></label>
  27. <input class="form-control" name="update_password_current" id="update_password_current" placeholder="current password" title="enter your current password." type="password" />
  28. </div>
  29. <div class="form-group col-sm-4">
  30. <label for="update_password"><h4>New Password</h4></label>
  31. <input class="form-control" name="update_password" id="update_password" placeholder="new password" title="enter your password." type="password" />
  32. </div>
  33. <div class="form-group col-sm-4">
  34. <label for="update_password_confirm"><h4>Verify New Password</h4></label>
  35. <input class="form-control" name="update_password_confirm" id="update_password_confirm" placeholder="new password confirmed" title="enter your password again." type="password" />
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="form-group col-sm-6">
  40. <label for="update_website"><h4>Website</h4></label>
  41. <input class="form-control" id="update_website" name="update_website" placeholder="http://www.noneofyourbusiness.com/" title="enter your website" type="text" value="@Model.UserSettings.Website" />
  42. </div>
  43. <div class="form-group col-sm-6">
  44. <label for="update_quote"><h4>Quote</h4></label>
  45. <input class="form-control" id="update_quote" name="update_quote" placeholder="I have a dream!" title="enter a memorable quote" type="text" value="@Model.UserSettings.Quote" maxlength="140" />
  46. </div>
  47. </div>
  48. <div class="row">
  49. <div class="form-group col-sm-12">
  50. <label for="update_about"><h4>About Yourself</h4></label>
  51. <textarea class="form-control" name="update_about" id="update_about" placeholder="I'm awesome" title="enter any information you want to share with the world." data-provide="markdown" rows="10">@Model.UserSettings.About</textarea>
  52. </div>
  53. </div>
  54. <!-- Blog Settings -->
  55. <div class="row">
  56. <div class="col-sm-12 text-center">
  57. <h3>Blog Settings</h3>
  58. </div>
  59. </div>
  60. <hr>
  61. <div class="row">
  62. <div class="form-group col-sm-6">
  63. <label for="update_blog_title"><h4>Title</h4></label>
  64. <input class="form-control" id="update_blog_title" name="update_blog_title" placeholder="click bait" title="enter your blog's title" type="text" value="@Model.BlogSettings.Title" />
  65. </div>
  66. <div class="form-group col-sm-6">
  67. <label for="update_blog_description"><h4>Description</h4></label>
  68. <input class="form-control" id="update_blog_description" name="update_blog_description" placeholder="This blog is not worth reading." title="enter your blog's description" type="text" value="@Model.BlogSettings.Description" />
  69. </div>
  70. </div>
  71. <!-- Upload Settings -->
  72. <div class="row">
  73. <div class="col-sm-12 text-center">
  74. <h3>Upload Settings</h3>
  75. </div>
  76. </div>
  77. <hr>
  78. <div class="row">
  79. <div class="col-sm-6">
  80. <div class="checkbox">
  81. <label>
  82. <label for="update_upload_saveKey"><h4>Save Key on Server</h4></label>
  83. <input id="update_upload_saveKey" name="update_upload_saveKey" title="whether the key should be saved on the server or not" type="checkbox" value="true" @(Model.UploadSettings.SaveKey ? "checked" : string.Empty) />
  84. </label>
  85. </div>
  86. </div>
  87. <div class="col-sm-6">
  88. <div class="checkbox">
  89. <label>
  90. <label for="update_upload_serverSideEncrypt"><h4>Encrypt on Server Side</h4></label>
  91. <input id="update_upload_serverSideEncrypt" name="update_upload_serverSideEncrypt" title="whether the file should be encrypted server side or client side" type="checkbox" value="true" @(Model.UploadSettings.ServerSideEncrypt ? "checked" : string.Empty) />
  92. </label>
  93. </div>
  94. </div>
  95. </div>
  96. <!-- Save Settings -->
  97. <div class="row">
  98. <div class="form-group col-sm-10">
  99. <br />
  100. <button class="btn btn-lg btn-success" id="update_submit" type="submit"><i class="glyphicon glyphicon-ok-sign"></i> Save</button>
  101. <button class="btn btn-lg" type="reset"><i class="glyphicon glyphicon-repeat"></i> Reset</button>
  102. </div>
  103. <div class="form-group col-sm-2">
  104. <br />
  105. <button type="button" class="btn btn-danger" id="delete_account">Delete Account</button>
  106. </div>
  107. </div>
  108. </form>
  109. </div><!--/col-9-->
  110. </div><!--/row-->
  111. }
  112. else
  113. {
  114. <div class="row">
  115. <div class="col-sm-12 text-center">
  116. <h2>Sorry, but I couldn't find that user.</h2>
  117. </div>
  118. </div>
  119. }
  120. </div>