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.

46 lines
1.8 KiB

  1. {% if num_lists %}
  2. <p class="alert alert-success">Authentication successful!</p>
  3. <p>Please select the Trello list to post notifications to:</p>
  4. <form method="post" class="form-horizontal">
  5. {% csrf_token %}
  6. <input type="hidden" name="token" value="{{ token }}" />
  7. <input id="board-name" type="hidden" name="board_name" value="" />
  8. <input id="list-name" type="hidden" name="list_name" value="" />
  9. <input id="list-id" type="hidden" name="list_id" value="" />
  10. <div class="form-group {{ form.value.css_classes }}">
  11. <label for="list-selector" class="col-sm-3 control-label">Post Notifications to</label>
  12. <div class="col-sm-3">
  13. <select id="list-selector" name="board_list_id" class="form-control">
  14. {% for board in boards %}
  15. <optgroup label="{{ board.name }}">
  16. {% for list in board.lists %}
  17. <option
  18. data-list-id="{{ list.id }}"
  19. data-board-name="{{ board.name }}"
  20. data-list-name="{{ list.name}}"
  21. value="{{ board.id }},{{ list.id}}">{{ list.name }}</option>
  22. {% endfor %}
  23. </optgroup>
  24. {% endfor %}
  25. </select>
  26. {% if form.board_list_id.errors %}
  27. <div class="help-block">
  28. {{ form.board_list_id.errors|join:"" }}
  29. </div>
  30. {% endif %}
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <div class="col-sm-offset-3 col-sm-9">
  35. <button type="submit" class="btn btn-primary">Save Integration</button>
  36. </div>
  37. </div>
  38. </form>
  39. {% else %}
  40. <p class="alert alert-warning">
  41. Could not find any boards with lists in your Trello account.
  42. Are you logged in the correct Trello account?
  43. </p>
  44. {% endif %}