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.

67 lines
2.3 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" value="csv" checked> Upload a TXT file from your computer<br>
  30. <input type="radio" name="format" value="json" checked> Upload a JSON file from your computer<br>
  31. </label>
  32. <div class="file has-name is-small mb20">
  33. <label class="file-label">
  34. <input class="file-input" type="file" ref="file" name="file" required v-on:change="handleFileUpload()">
  35. <span class="file-cta">
  36. <span class="file-icon">
  37. <i class="fas fa-upload"></i>
  38. </span>
  39. <span class="file-label">
  40. Select a file…
  41. </span>
  42. </span>
  43. <span class="file-name">
  44. [[ file ]]
  45. </span>
  46. </label>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="field is-grouped">
  51. <div class="control">
  52. <button type="submit" class="button is-primary">Upload dataset</button>
  53. </div>
  54. <div class="control">
  55. <button class="button is-text">Cancel</button>
  56. </div>
  57. </div>
  58. </form>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. {% endblock %}
  64. {% block footer %}
  65. <script src="{% static 'bundle/upload.js' %}"></script>
  66. {% endblock %}