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.

149 lines
8.8KB

  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="book">Book</option>
  12. </select>
  13. </div>
  14. <div id="resource_type_tool" class="resource_type_input" style="display: none;">
  15. <div class="mb-3 mt-3">
  16. <label for="tool_name">Tool name</label>
  17. <input class="form-control" type="text" name="tool_name" placeholder="Tool name" autofocus="">
  18. </div>
  19. <div class="mb-3 mt-3">
  20. <label for="description">Short description</label>
  21. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Tool description" autofocus=""></textarea>
  22. </div>
  23. <div class="mb-3 mt-3">
  24. <label for="developer">Developer</label>
  25. <input class="form-control" type="text" name="developer" placeholder="Developer" autofocus="">
  26. </div>
  27. <div class="mb-3 mt-3">
  28. <label for="developerUrl">Developer URL</label>
  29. <input class="form-control" type="text" name="developerUrl" placeholder="Developer URL" autofocus="">
  30. </div>
  31. <div class="mb-3 mt-3">
  32. <label for="projectUrl">Project URL</label>
  33. <input class="form-control" type="text" name="projectUrl" placeholder="Project URL" autofocus="">
  34. </div>
  35. <div class="mb-3 mt-3">
  36. <label for="repositoryUrl">Repository URL</label>
  37. <input class="form-control" type="text" name="repositoryUrl" placeholder="Repository URL" autofocus="">
  38. </div>
  39. <div class="mb-3 mt-3">
  40. <label for="license">Software license</label>
  41. <input class="form-control" type="text" name="license" placeholder="Software license" autofocus="">
  42. </div>
  43. <div class="mb-3 mt-3">
  44. <label for="scriptingLanguage">Software language</label>
  45. <input class="form-control" type="text" name="scriptingLanguage" placeholder="Software language" autofocus="">
  46. </div>
  47. <div class="mb-3 mt-3">
  48. <label for="expertiseToUse">Expertise required to use</label>
  49. <input class="form-control" type="text" name="expertiseToUse" placeholder="Expertise required to use" autofocus="">
  50. </div>
  51. <div class="mb-3 mt-3">
  52. <label for="expertiseToHost">Expertise required to self-host</label>
  53. <input class="form-control" type="text" name="expertiseToHost" placeholder="Expertise required to self-host" autofocus="">
  54. </div>
  55. <div class="mb-3 mt-3">
  56. <label for="dependencies">Technical dependencies</label>
  57. <input class="form-control" type="text" name="dependencies" placeholder="Technical dependencies" autofocus="">
  58. </div>
  59. <div class="mb-3 mt-3">
  60. <label for="ingestFormats">Import / ingest formats</label>
  61. <input class="form-control" type="text" name="ingestFormats" placeholder="Import / ingest formats" autofocus="">
  62. </div>
  63. <div class="mb-3 mt-3">
  64. <label for="outputFormats">Output formats</label>
  65. <input class="form-control" type="text" name="outputFormats" placeholder="Output formats" autofocus="">
  66. </div>
  67. <div class="mb-3 mt-3">
  68. <label for="status">Platform status</label>
  69. <input class="form-control" type="text" name="status" placeholder="Platform status" autofocus="">
  70. </div>
  71. <div class="mb-3 mt-3">
  72. <label for="linked_practice_id">Linked resources</label>
  73. </div>
  74. <div class="mb-3 mt-3">
  75. <select name="linked_resources" id="linked_resources" aria-label="Linked resources" class="selectpicker" data-live-search="true" multiple>
  76. {% for resource_dropdown in resource_dropdown %}
  77. {% if resource_dropdown['type'] != 'tool' %}
  78. <option value="{{ resource_dropdown['id'] }}">{{ resource_dropdown['name'] }}</option>
  79. {% endif %}
  80. {% endfor %}
  81. </select>
  82. </div>
  83. </div>
  84. <div id="resource_type_practice" class="resource_type_input" style="display: none;">
  85. <div class="mb-3 mt-3">
  86. <label for="practice_name">Practice name</label>
  87. <input class="form-control" type="text" name="practice_name" placeholder="Practice name" autofocus="">
  88. </div>
  89. <div class="mb-3 mt-3">
  90. <label for="description">Description</label>
  91. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Description" autofocus=""></textarea>
  92. </div>
  93. <div class="mb-3 mt-3">
  94. <label for="longDescription">Full description</label>
  95. <textarea class="form-control" rows="4" type="text" name="longDescription" placeholder="Full description" autofocus=""></textarea>
  96. </div>
  97. <div class="mb-3 mt-3">
  98. <label for="experimental">Experimental uses</label>
  99. <textarea class="form-control" rows="4" type="text" name="experimental" placeholder="Experimental uses" autofocus=""></textarea>
  100. </div>
  101. <div class="mb-3 mt-3">
  102. <label for="considerations">Considerations</label>
  103. <textarea class="form-control" rows="4" type="text" name="considerations" placeholder="Considerations" autofocus=""></textarea>
  104. </div>
  105. <div class="mb-3 mt-3">
  106. <label for="references">Further reading</label>
  107. <textarea class="form-control" rows="4" type="text" name="references" placeholder="Further reading" autofocus=""></textarea>
  108. </div>
  109. </div>
  110. <div id="resource_type_book" class="resource_type_input" style="display: none;">
  111. <div class="mb-3 mt-3">
  112. <label for="book_name">Book name</label>
  113. <input class="form-control" type="text" name="book_name" placeholder="Book name" autofocus="">
  114. </div>
  115. <div class="mb-3 mt-3">
  116. <label for="description">Description</label>
  117. <textarea class="form-control" rows="4" type="text" name="description" placeholder="Book description" autofocus=""></textarea>
  118. </div>
  119. <div class="mb-3 mt-3">
  120. <label for="author">Author</label>
  121. <input class="form-control" type="text" name="author" placeholder="Author" autofocus="">
  122. </div>
  123. <div class="mb-3 mt-3">
  124. <label for="year">Publication year</label>
  125. <input class="form-control" type="text" name="year" placeholder="Publication year" autofocus="">
  126. </div>
  127. <div class="mb-3 mt-3">
  128. <label for="typology">Typology category</label>
  129. <input class="form-control" type="text" name="typology" placeholder="Typology category" autofocus="">
  130. </div>
  131. <div class="mb-3 mt-3">
  132. <label for="bookUrl">URL</label>
  133. <input class="form-control" type="text" name="bookUrl" placeholder="URL" autofocus="">
  134. </div>
  135. <div class="mb-3 mt-3">
  136. <label for="isbn">ISBN</label>
  137. <input class="form-control" type="text" name="isbn" placeholder="ISBN" autofocus="">
  138. </div>
  139. </div>
  140. <button type="submit" class="btn btn-default">Submit</button>
  141. </form>
  142. <script
  143. src="https://code.jquery.com/jquery-3.7.1.js"
  144. integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="
  145. crossorigin="anonymous"></script>
  146. {% endblock %}