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.

UploadSettings.cshtml 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. @model Teknik.Areas.Users.ViewModels.UploadSettingsViewModel
  2. @using Teknik.Areas.Users.ViewModels
  3. @{
  4. Layout = "~/Areas/User/Views/User/Settings/Settings.cshtml";
  5. }
  6. <script>
  7. var editURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditUpload" })';
  8. </script>
  9. <bundle src="css/user.settings.upload.min.css" append-version="true"></bundle>
  10. <!form class="form" action="##" method="post" id="updateForm">
  11. <div class="row form-horizontal">
  12. <div class="col-sm-6">
  13. <div class="form-group form-group-sm" data-toggle="tooltip" data-placement="top" title="When enabled, each file is encrypted before upload using an AES-256-CTR cipher. A key is generated and required to download the file later.">
  14. <label for="encrypt" class="col-sm-6 col-xs-3 control-label">Encrypt in Browser</label>
  15. <div class="col-sm-6 col-xs-9">
  16. <input id="update_upload_encrypt" name="update_upload_encrypt" title="whether the file should be encrypted in the browser before upload" type="checkbox" value="true" @(Model.Encrypt ? "checked" : string.Empty) />
  17. </div>
  18. </div>
  19. </div>
  20. <div class="col-sm-6">
  21. <div class="form-group form-group-sm">
  22. @if (!User.Identity.IsAuthenticated)
  23. {
  24. @:<label class="col-xs-3 control-label" data-toggle="tooltip" data-placement="top" title="Uploads expire after 1 day for unregistered users">Expiration*</label>
  25. }
  26. else
  27. {
  28. @:<label class="col-xs-3 control-label">Expiration</label>
  29. }
  30. <fieldset @if (!User.Identity.IsAuthenticated) { @: disabled
  31. }>
  32. <div class="col-xs-4 hidden" id="length-div">
  33. <input type="number" min="1" step="1" class="form-control" name="expirelength" id="expirelength" value="@Model.ExpirationLength">
  34. </div>
  35. <div class="col-xs-9" id="unit-div">
  36. <select class="form-control" name="expireunit" id="expireunit">
  37. @foreach (ExpirationUnit unit in Enum.GetValues(typeof(ExpirationUnit)))
  38. {
  39. <!option value="@unit" @(Model.ExpirationUnit == unit ? "selected" : string.Empty)>@unit.ToString()</!option>
  40. }
  41. </select>
  42. </div>
  43. </fieldset>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="row">
  48. <div class="form-group col-sm-10">
  49. <br />
  50. <button class="btn btn-success" id="update_submit" type="submit">Save</button>
  51. <button class="btn" type="reset">Reset</button>
  52. </div>
  53. </div>
  54. </!form>
  55. <bundle src="js/user.settings.upload.min.js" append-version="true"></bundle>