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.

153 lines
8.2KB

  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="sensitivity">Sensitivity</option>
  12. <option value="typology">Typology</option>
  13. <option value="workflow">Workflow</option>
  14. <option value="publisher">Publisher</option>
  15. <option value="book">Book</option>
  16. <option value="reference">Reference</option>
  17. </select>
  18. </div>
  19. <div id="resource_type_tool" class="resource_type_input" style="display: none;">
  20. <div class="mb-3 mt-3">
  21. <label for="tool_name">Tool name</label>
  22. <input class="form-control" type="text" name="tool_name" placeholder="Tool name" autofocus="">
  23. </div>
  24. <div class="mb-3 mt-3">
  25. <label for="description">Short description</label>
  26. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Tool description" autofocus=""></textarea>
  27. </div>
  28. <div class="mb-3 mt-3">
  29. <label for="projectUrl">Project URL</label>
  30. <input class="form-control" type="text" name="projectUrl" placeholder="Project URL" autofocus="">
  31. </div>
  32. <div class="mb-3 mt-3">
  33. <label for="repositoryUrl">Repository URL</label>
  34. <input class="form-control" type="text" name="repositoryUrl" placeholder="Repository URL" autofocus="">
  35. </div>
  36. <div class="mb-3 mt-3">
  37. <label for="expertiseToUse">Expertise required to use</label>
  38. <input class="form-control" type="text" name="expertiseToUse" placeholder="Expertise required to use" autofocus="">
  39. </div>
  40. <div class="mb-3 mt-3">
  41. <label for="expertiseToHost">Expertise required to self-host</label>
  42. <input class="form-control" type="text" name="expertiseToHost" placeholder="Expertise required to self-host" autofocus="">
  43. </div>
  44. <div class="mb-3 mt-3">
  45. <label for="dependencies">Technical dependencies</label>
  46. <input class="form-control" type="text" name="dependencies" placeholder="Technical dependencies" autofocus="">
  47. </div>
  48. <div class="mb-3 mt-3">
  49. <label for="ingestFormats">Import / ingest formats</label>
  50. <input class="form-control" type="text" name="ingestFormats" placeholder="Import / ingest formats" autofocus="">
  51. </div>
  52. <div class="mb-3 mt-3">
  53. <label for="outputFormats">Output formats</label>
  54. <input class="form-control" type="text" name="outputFormats" placeholder="Output formats" autofocus="">
  55. </div>
  56. <div class="mb-3 mt-3">
  57. <label for="status">Platform status</label>
  58. <input class="form-control" type="text" name="status" placeholder="Platform status" autofocus="">
  59. </div>
  60. <div class="mb-3 mt-3">
  61. <label for="linked_practice_id">Linked practices</label>
  62. <select class="form-select" aria-label="Linked practices" name="linked_practice_id">
  63. <option selected>Select a linked practice</option>
  64. {% for practice_dropdown in practice_dropdown %}
  65. <option value="{{ practice_dropdown['id'] }}">{{ practice_dropdown['name'] }}</option>
  66. {% endfor %}
  67. </select>
  68. </div>
  69. </div>
  70. <div id="resource_type_practice" class="resource_type_input" style="display: none;">
  71. <div class="mb-3 mt-3">
  72. <label for="practice_name">Practice name</label>
  73. <input class="form-control" type="text" name="practice_name" placeholder="Practice name" autofocus="">
  74. </div>
  75. <div class="mb-3 mt-3">
  76. <label for="description">Practice description</label>
  77. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Practice description" autofocus=""></textarea>
  78. </div>
  79. </div>
  80. <div id="resource_type_sensitivity" class="resource_type_input" style="display: none;">
  81. <div class="mb-3 mt-3">
  82. <label for="sensitivity_name">Sensitivity name</label>
  83. <input class="form-control" type="text" name="sensitivity_name" placeholder="Sensitivity name" autofocus="">
  84. </div>
  85. <div class="mb-3 mt-3">
  86. <label for="description">Sensitivity description</label>
  87. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Sensitivity description" autofocus=""></textarea>
  88. </div>
  89. </div>
  90. <div id="resource_type_typology" class="resource_type_input" style="display: none;">
  91. <div class="mb-3 mt-3">
  92. <label for="typology_name">Typology name</label>
  93. <input class="form-control" type="text" name="typology_name" placeholder="Typology name" autofocus="">
  94. </div>
  95. <div class="mb-3 mt-3">
  96. <label for="description">Typology description</label>
  97. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Typology description" autofocus=""></textarea>
  98. </div>
  99. </div>
  100. <div id="resource_type_workflow" class="resource_type_input" style="display: none;">
  101. </div>
  102. <div id="resource_type_publisher" class="resource_type_input" style="display: none;">
  103. <div class="mb-3 mt-3">
  104. <label for="publisher_name">Publisher name</label>
  105. <input class="form-control" type="text" name="publisher_name" placeholder="Publisher name" autofocus="">
  106. </div>
  107. <div class="mb-3 mt-3">
  108. <label for="description">Publisher description</label>
  109. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Publisher description" autofocus=""></textarea>
  110. </div>
  111. <div class="mb-3 mt-3">
  112. <label for="publisherUrl">Publisher URL</label>
  113. <input class="form-control" type="text" name="publisherUrl" placeholder="Publisher URL" autofocus="">
  114. </div>
  115. </div>
  116. <div id="resource_type_book" class="resource_type_input" style="display: none;">
  117. <div class="mb-3 mt-3">
  118. <label for="book_name">Book name</label>
  119. <input class="form-control" type="text" name="book_name" placeholder="Book name" autofocus="">
  120. </div>
  121. <div class="mb-3 mt-3">
  122. <label for="description">Book description</label>
  123. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Book description" autofocus=""></textarea>
  124. </div>
  125. </div>
  126. <div id="resource_type_reference" class="resource_type_input" style="display: none;">
  127. <div class="mb-3 mt-3">
  128. <label for="zoteroUrl">Zotero URL</label>
  129. <input class="form-control" type="text" name="zoteroUrl" placeholder="Zotero URL" autofocus="">
  130. </div>
  131. </div>
  132. <button type="submit" class="btn btn-primary mb-3">Submit</button>
  133. </form>
  134. {% endblock %}