| <li id="user-menu-item-assign-mentor"> |
| <p class="user-menu-row-title">Assign Mentor</p> |
| <span id="user-menu-question"> |
| <a class="load-tooltip" href="#assign-mentor-tooltip" rel="#assign-mentor-tooltip"> |
| ? |
| </a> |
| </span> |
| <div id="assign-mentor-tooltip" class="tooltip"> |
| Select a mentor from the drop-down list to assign to this project. |
| {% if not all_mentors %} |
| <span class="user-menu-note"> |
| Note that only mentors that have clicked the "I wish to mentor this |
| project" button can be selected. <br/> |
| This can be changed in the organization profile page under |
| "Organization preferences". |
| </span> |
| {% endif %} |
| </div> |
| <form action="{{ action }}" method="post" id="form" class="form-user-proposal-assign-mentor"> |
| <div id="user-menu-add-mentor"> |
| <div id="user-menu-select-mentors"> |
| {% for mentor in mentors %} |
| <select name="assign_mentor" |
| id="id-assign-mentor{% if forloop.counter > 1 %}-{{ forloop.counter|add:"-1" }}{% endif %}"> |
| <option {% if mentor_required and forloop.counter == 1 %} |
| disabled="disabled" |
| {% endif %} value=""> |
| Assign Mentor |
| </option> |
| {% if mentor.possible_mentors %} |
| <optgroup label="Possible Mentors"> |
| {% for m in mentor.possible_mentors %} |
| <option value="{{ m.key }}" {% if m.selected %}selected="selected"{% endif %}>{{ m.name }}</option> |
| {% endfor %} |
| </optgroup> |
| {% endif %} |
| {% if mentor.all_mentors %} |
| {% if mentor.possible_mentors %}<optgroup label="All Mentors">{% endif %} |
| {% for m in mentor.all_mentors %} |
| <option value="{{ m.key }}" {% if m.selected %}selected="selected"{% endif %}>{{ m.name }}</option> |
| {% endfor %} |
| </optgroup> |
| {% endif %} |
| </select> |
| {% endfor %} |
| </div> |
| {% if allow_multiple %} |
| <div id="user-menu-add-another-link"> |
| <a href="javascript:new_link()">Add New</a> |
| </div> |
| {% endif %} |
| </div> |
| <input id="form-user-proposal-assign-mentor-submit" type="submit" value="Assign" class="submit" /> |
| </form> |
| </li> |