Admin can select staffer

This commit is contained in:
2019-02-26 15:31:34 +11:00
parent 2d56973682
commit 28f4ce1af2
2 changed files with 26 additions and 1 deletions

View File

@@ -68,6 +68,18 @@
{% endif %}
{% if user_id == sslot[0].user_id %}
<div class='sheet_user{{ num_slot }} {{ border }}' id='staff_{{ turn_id }}_{{ slot }}' onclick='javascript:clear_sheet(this, {{ turn_id }}, {{ slot }})'>{{ sslot[1] }}</div>
{% elif is_admin %}
<div class='sheet_user{{ num_slot }} {{ border }}'>
<select id='staff_{{ turn_id }}_{{ slot }}' onchange='javascript:select_user(this, {{ turn_id }}, {{ slot }})'>
{% for staffer in staffers %}
{% if staffer.name == sslot[1] %}
<option value='{{ staffer.id }}'>{{ staffer.name }}</option>
{% else %}
<option selected='selected' value='{{ staffer.id }}'>{{ staffer.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
{% else %}
<div class='sheet_user{{ num_slot }} {{ border }}' id='staff_{{ turn_id }}_{{ slot }}' style='cursor: text;'>{{ sslot[1] }}</div>
{% endif %}