manage_playlists_create.html 4.9 KB

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