manage_playlists_create.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <br>
  2. <hr>
  3. <br>
  4. <div class="container-fluid">
  5. <h2>Create a new YouTube Playlist</h2>
  6. <br>
  7. <div id="import-playlists-from">
  8. <div class="mb-3">
  9. <h4 for="playlistName" class="form-label">Playlist Name</h4>
  10. <input type="email" class="form-control bg-dark text-white" placeholder="Enter playlist name" id="playlistName" name="playlistName" describedby="playlistNameHelp">
  11. <div id="playlistNameHelp" class="form-text">Make sure the playlist name is unique!</div>
  12. </div>
  13. <div class="mb-3">
  14. <h4 for="playlist-desc-text-area" class="form-label">Playlist Description</h4>
  15. <textarea name="playlistDescription" class="form-control bg-dark text-white" id="playlist-desc-text-area" placeholder="Enter playlist description here" rows="5"
  16. hx-post="{% url 'manage_save' 'manage_playlists_import_textarea' %}"
  17. hx-trigger="keyup changed delay:500ms"
  18. hx-indicator="#spinner"></textarea>
  19. </div>
  20. <h4 class="form-label">Playlist Type</h4>
  21. <div class="mb-3">
  22. <div class="form-check">
  23. <input class="form-check-input" type="radio" name="playlistType" value="public" id="public" checked>
  24. <h6 class="form-check-label" for="public">
  25. Public
  26. </h6>
  27. </div>
  28. <div class="form-check">
  29. <input class="form-check-input" type="radio" name="playlistType" value="private" id="private">
  30. <h6 class="form-check-label" for="private">
  31. Private
  32. </h6>
  33. </div>
  34. </div>
  35. <h4 class="form-label">Add videos from your collection</h4>
  36. <div class="d-flex justify-content-evenly mb-3">
  37. <div class="container-fluid">
  38. <input class="form-control bg-dark text-black-50 mb-2" type="text"
  39. name="searchForVideosToAddBar" placeholder="Begin to search your video collection..."
  40. hx-post="#"
  41. hx-trigger="keyup changed delay:500ms"
  42. hx-target="#search-results"
  43. hx-indicator=".htmx-indicator">
  44. <select class="form-select bg-dark text-white" name="videoIdsFromSearch" multiple aria-label="multiple select example" size="10">
  45. <option selected>Open this select menu</option>
  46. <option value="1">One</option>
  47. <option value="2">Two</option>
  48. <option value="3">Three</option>
  49. </select>
  50. </div>
  51. <div class="btn-group-vertical">
  52. <button class="btn btn-danger"> < </button>
  53. <button class="btn btn-success"> > </button>
  54. </div>
  55. <div class="container-fluid">
  56. <h5 class="d-flex justify-content-start">
  57. All these will be added to the playlist
  58. </h5>
  59. <select class="form-select bg-dark text-white" name="videoIdsToBeAdded" multiple aria-label="multiple select example" size="10">
  60. <div id="videosToBeAddedBox">
  61. <option value="1" selected>One</option>
  62. <option value="2" selected>Two</option>
  63. <option value="3" selected>Three</option>
  64. </div>
  65. </select>
  66. </div>
  67. </div>
  68. <div class="mb-3">
  69. <h4 for="playlist-video-links-text-area" class="form-label">Or add videos via video links</h4>
  70. <textarea name="externalVideoLinks" class="form-control bg-dark text-white" id="playlist-video-links-text-area" placeholder="Enter video links line by line" rows="5"
  71. hx-post="{% url 'manage_save' 'manage_playlists_import_textarea' %}"
  72. hx-trigger="keyup changed delay:500ms"
  73. hx-indicator="#spinner">{{ manage_playlists_import_textarea }}</textarea>
  74. </div>
  75. <!--
  76. <input class="form-check-input mx-3 big-checkbox" type="checkbox" name="e" id="checkbox"> <br>
  77. <input class="form-check-input mx-3 big-checkbox" type="checkbox" name="f" id="checkbox"> <br>
  78. <input class="form-check-input mx-3 big-checkbox" type="checkbox" name="g" id="checkbox"> <br>
  79. <input class="form-check-input mx-3 big-checkbox" type="checkbox" name="h" id="checkbox"> <br>
  80. -->
  81. </div>
  82. <div class="d-flex justify-content-start">
  83. <button type="button" hx-post="{% url 'manage_create_playlist' %}" hx-include="[id='import-playlists-from']" hx-target="#import-playlists-results" hx-indicator="#spinner" class="btn btn-success">
  84. Create Playlist!
  85. </button>
  86. <div id="spinner" class="htmx-indicator ms-3 mt-2">
  87. <div class="spinner-border text-light" role="status">
  88. </div>
  89. </div>
  90. </div>
  91. <br>
  92. <div id="import-playlists-results">
  93. </div>
  94. <br>
  95. </div>