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.

68 lines
2.6 KiB

  1. {% load hc_extras %}
  2. <div class="modal-dialog">
  3. <form
  4. action="{% url 'hc-transfer' check.code %}"
  5. class="form-horizontal"
  6. method="post">
  7. {% csrf_token %}
  8. <div class="modal-content">
  9. <div class="modal-header">
  10. <button type="button" class="close" data-dismiss="modal">&times;</button>
  11. <h4 class="update-timeout-title">Transfer to Another Project</h4>
  12. </div>
  13. <div class="modal-body">
  14. <div class="form-group">
  15. <label for="update-name-input" class="col-sm-4 control-label">
  16. Check
  17. </label>
  18. <div class="col-sm-7">
  19. <p class="form-control-static">{{ check.name_then_code }}</p>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label for="update-name-input" class="col-sm-4 control-label">
  24. Target Project
  25. </label>
  26. <div class="col-sm-7">
  27. <select
  28. id="target-project"
  29. name="project"
  30. title="Select..."
  31. class="form-control selectpicker">
  32. {% for project in request.profile.projects.all %}
  33. {% if project == check.project %}
  34. <option disabled data-subtext="(current project)">
  35. {{ project }}
  36. </option>
  37. {% elif project.num_checks_available > 0 %}
  38. <option value="{{ project.code }}">{{ project }}</option>
  39. {% else %}
  40. <option disabled data-subtext="(at check limit)">
  41. {{ project }}
  42. </option>
  43. {% endif %}
  44. {% endfor %}
  45. </select>
  46. </div>
  47. </div>
  48. <div class="text-warning">
  49. <strong>Integrations will get reset.</strong>
  50. The check will lose its current notification
  51. channels, and will be assigned all notification
  52. channels of the target project.
  53. </div>
  54. </div>
  55. <div class="modal-footer">
  56. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  57. <button
  58. id="transfer-confirm"
  59. disabled
  60. type="submit"
  61. class="btn btn-primary">Transfer</button>
  62. </div>
  63. </div>
  64. </form>
  65. </div>