Allow partners to add staff or branch managers
This commit is contained in:
@@ -44,9 +44,12 @@
|
||||
<div>
|
||||
<label class="mb-1 block text-sm font-medium text-slate-700">Employee User Role</label>
|
||||
{% if partner_staff_mode %}
|
||||
<input type="hidden" name="employee_role" value="Staff">
|
||||
<input value="Staff" disabled class="w-full rounded-xl border border-slate-300 bg-slate-100 px-3 py-2 text-sm text-slate-700">
|
||||
<p class="mt-1 text-xs text-slate-500">Partners can create Staff users only.</p>
|
||||
<select name="employee_role" class="w-full rounded-xl border border-slate-300 px-3 py-2 text-sm">
|
||||
{% set selected_role = employee.get('employee_role', 'Staff') if employee and is_dict else 'Staff' %}
|
||||
<option value="Staff" {% if selected_role == 'Staff' %}selected{% endif %}>Staff</option>
|
||||
<option value="Branch Manager" {% if selected_role == 'Branch Manager' %}selected{% endif %}>Manager</option>
|
||||
</select>
|
||||
<p class="mt-1 text-xs text-slate-500">The user will be created for your branch as Staff or Manager.</p>
|
||||
{% else %}
|
||||
<select name="employee_role" class="w-full rounded-xl border border-slate-300 px-3 py-2 text-sm">{% for r in employee_role_names %}<option value="{{ r }}" {% if r == 'Staff' %}selected{% endif %}>{{ r }}</option>{% endfor %}</select>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user