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.

create.html 6.3KB

3 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
2 jaren geleden
3 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <h1>{% block title %} Add a New Resource{% endblock %}</h1>
  4. <form method="POST" action="/create" id="resource">
  5. <div class="mb-3 mt-3">
  6. <label for="type">Type</label>
  7. <select class="form-select" id="resource_type" name="resource_type" form="resource">
  8. <option selected="selected">Please choose</option>
  9. <option value="tool">Tool</option>
  10. <option value="practice">Practice</option>
  11. <option value="publisher">Publisher</option>
  12. <option value="book">Book</option>
  13. </select>
  14. </div>
  15. <div id="resource_type_tool" class="resource_type_input" style="display: none;">
  16. <div class="mb-3 mt-3">
  17. <label for="tool_name">Tool name</label>
  18. <input class="form-control" type="text" name="tool_name" placeholder="Tool name" autofocus="">
  19. </div>
  20. <div class="mb-3 mt-3">
  21. <label for="description">Short description</label>
  22. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Tool description" autofocus=""></textarea>
  23. </div>
  24. <div class="mb-3 mt-3">
  25. <label for="projectUrl">Project URL</label>
  26. <input class="form-control" type="text" name="projectUrl" placeholder="Project URL" autofocus="">
  27. </div>
  28. <div class="mb-3 mt-3">
  29. <label for="repositoryUrl">Repository URL</label>
  30. <input class="form-control" type="text" name="repositoryUrl" placeholder="Repository URL" autofocus="">
  31. </div>
  32. <div class="mb-3 mt-3">
  33. <label for="expertiseToUse">Expertise required to use</label>
  34. <input class="form-control" type="text" name="expertiseToUse" placeholder="Expertise required to use" autofocus="">
  35. </div>
  36. <div class="mb-3 mt-3">
  37. <label for="expertiseToHost">Expertise required to self-host</label>
  38. <input class="form-control" type="text" name="expertiseToHost" placeholder="Expertise required to self-host" autofocus="">
  39. </div>
  40. <div class="mb-3 mt-3">
  41. <label for="dependencies">Technical dependencies</label>
  42. <input class="form-control" type="text" name="dependencies" placeholder="Technical dependencies" autofocus="">
  43. </div>
  44. <div class="mb-3 mt-3">
  45. <label for="ingestFormats">Import / ingest formats</label>
  46. <input class="form-control" type="text" name="ingestFormats" placeholder="Import / ingest formats" autofocus="">
  47. </div>
  48. <div class="mb-3 mt-3">
  49. <label for="outputFormats">Output formats</label>
  50. <input class="form-control" type="text" name="outputFormats" placeholder="Output formats" autofocus="">
  51. </div>
  52. <div class="mb-3 mt-3">
  53. <label for="status">Platform status</label>
  54. <input class="form-control" type="text" name="status" placeholder="Platform status" autofocus="">
  55. </div>
  56. <div class="mb-3 mt-3">
  57. <label for="linked_practice_id">Linked resources</label>
  58. </div>
  59. <div class="mb-3 mt-3">
  60. <select name="linked_resources" id="linked_resources" aria-label="Linked resources" class="selectpicker" data-live-search="true" multiple>
  61. {% for resource_dropdown in resource_dropdown %}
  62. {% if resource_dropdown['type'] != 'tool' %}
  63. <option value="{{ resource_dropdown['id'] }}">{{ resource_dropdown['name'] }}</option>
  64. {% endif %}
  65. {% endfor %}
  66. </select>
  67. </div>
  68. </div>
  69. <div id="resource_type_practice" class="resource_type_input" style="display: none;">
  70. <div class="mb-3 mt-3">
  71. <label for="practice_name">Practice name</label>
  72. <input class="form-control" type="text" name="practice_name" placeholder="Practice name" autofocus="">
  73. </div>
  74. <div class="mb-3 mt-3">
  75. <label for="description">Practice description</label>
  76. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Practice description" autofocus=""></textarea>
  77. </div>
  78. </div>
  79. <div id="resource_type_publisher" class="resource_type_input" style="display: none;">
  80. <div class="mb-3 mt-3">
  81. <label for="publisher_name">Publisher name</label>
  82. <input class="form-control" type="text" name="publisher_name" placeholder="Publisher name" autofocus="">
  83. </div>
  84. <div class="mb-3 mt-3">
  85. <label for="description">Publisher description</label>
  86. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Publisher description" autofocus=""></textarea>
  87. </div>
  88. <div class="mb-3 mt-3">
  89. <label for="publisherUrl">Publisher URL</label>
  90. <input class="form-control" type="text" name="publisherUrl" placeholder="Publisher URL" autofocus="">
  91. </div>
  92. </div>
  93. <div id="resource_type_book" class="resource_type_input" style="display: none;">
  94. <div class="mb-3 mt-3">
  95. <label for="book_name">Book name</label>
  96. <input class="form-control" type="text" name="book_name" placeholder="Book name" autofocus="">
  97. </div>
  98. <div class="mb-3 mt-3">
  99. <label for="description">Book description</label>
  100. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Book description" autofocus=""></textarea>
  101. </div>
  102. </div>
  103. <button type="submit" class="btn btn-primary mb-3">Submit</button>
  104. </form>
  105. {% endblock %}