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.

66 lines
2.2 KiB

  1. {% extends "admin/admin_base.html" %}
  2. {% load static %}
  3. {% block content-area %}
  4. <div class="columns">
  5. <div class="column is-12">
  6. <div class="card">
  7. <header class="card-header">
  8. <p class="card-header-title">
  9. Import text items
  10. </p>
  11. <a href="#" class="card-header-icon" aria-label="more options">
  12. <span class="icon">
  13. <i class="fas fa-angle-down" aria-hidden="true"></i>
  14. </span>
  15. </a>
  16. </header>
  17. <div class="card-content">
  18. <p>
  19. <b>To annotate texts, you first need to import a set of text items to annotate it.</b>
  20. </p>
  21. <p>
  22. Each line should contain a text.
  23. </p>
  24. <form action="" method="post" enctype="multipart/form-data">
  25. {% csrf_token %}
  26. <div class="section">
  27. <div class="control">
  28. <label class="radio mb10">
  29. <input type="radio" name="format" checked> Upload a TXT file from your computer
  30. </label>
  31. <div class="file has-name is-small mb20">
  32. <label class="file-label">
  33. <input class="file-input" type="file" ref="file" name="csv_file" required v-on:change="handleFileUpload()">
  34. <span class="file-cta">
  35. <span class="file-icon">
  36. <i class="fas fa-upload"></i>
  37. </span>
  38. <span class="file-label">
  39. Select a file…
  40. </span>
  41. </span>
  42. <span class="file-name">
  43. [[ file ]]
  44. </span>
  45. </label>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="field is-grouped">
  50. <div class="control">
  51. <button type="submit" class="button is-primary">Upload dataset</button>
  52. </div>
  53. <div class="control">
  54. <button class="button is-text">Cancel</button>
  55. </div>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. {% endblock %}
  63. {% block footer %}
  64. <script src="{% static 'bundle/upload.js' %}"></script>
  65. {% endblock %}