manage_playlists_create.html 4.9 KB

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