Commit a3cc8204 authored by Josh Paetzel's avatar Josh Paetzel
Browse files

add missed template

parent 4113c306
Showing with 80 additions and 0 deletions
+80 -0
{% extends "bsduser_base.html" %}
{% block dojango_content %}
{% if user.is_authenticated %}
<div id="bsduserDlg" dojoType="dijit.Dialog" title="Modify User" dolayout="false">
<form action="." method="post">{% csrf_token %}
<table>
{{ form }}
</table>
<button style="margin-top:16px;" dojoType="dijit.form.Button" type="submit">Modify User</button>
<button style="margin-top:16px;" dojoType="dijit.form.Button" type="button" onClick="window.location='/account/'">Back</button>
</form>
</div>
<div dojoType="dijit.layout.TabContainer" style="width:100%;float:left;" doLayout="false">
<div dojoType="dijit.layout.ContentPane" title="User Management">
<table class="grid">
<tbody>
<tr>
{% if bsduser_list %}
<h5>Active Users: <strong>{{ bsduser_list|length }}</strong></h5>
{% else %}
<p>There are no active users.</p>
{% endif %}
</tr>
</tbody>
<thead class="ghead">
<td>ID</td>
<td>Username</td>
<td>Group</td>
<td>Home</td>
<td>Shell</td>
<td>Modify</td>
<td>Remove</td>
</thead>
<tbody>
{% for u in bsduser_list %}
<tr class="{% cycle 'odd' 'even' %}" id="{{ u.id }}">
<td>
{{ u.bsdusr_uid }}
</td>
<td>
{{ u.bsdusr_username }}
</td>
<td>
{{ u.bsdusr_gid }}
</td>
<td>
{{ u.bsdusr_home }}
</td>
<td>
{{ u.bsdusr_shell }}
</td>
<td>
<button dojoType="dijit.form.Button" type="button" onClick="window.location='/account/bsduser/{{ u.id }}/view/'">Modify User</button>
</td>
<td>
<button dojoType="dijit.form.Button" type="button" onClick="window.location='/account/bsduser/delete/{{ u.id }}/'">Remove User</button>
</td>
</tr>
{% empty %}
<tr>
<td colspan="3">No users defined</td>
</tr>
{% endfor %}
</tbody>
</table>
<div style="padding:12px;"><button dojoType="dijit.form.Button" type="button" onClick="dijit.byId('bsduserDlg').show();">Add New User</button>
</div>
</td>
</tr>
</div>
</div>
</div>
{% else %}
<p>Welcome. Please <a href="/freenas/login/">log in</a>.</p>
{% endif %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment