{% extends "admin_base.html" %}
{% load seahub_tags i18n %}

{% block main_panel %}
<h3>{% trans "Search User"%}</h3>

<form id="search-user-form" method="get" action=".">
  <p class="tip">{% trans "Tip: Use * to match any number of characters." %}</p>
  <label>{% trans "Email" %}</label><input type="text" name="email" class="input" value="{{email}}" /><br />
  <input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
<h3>{% trans "Result"%}</h3>
{% if users %}
{% include "sysadmin/useradmin_table.html"%}
{% else %}
<p>{% trans "No result" %}</p>
{% endif %}

<div id="activate-msg" class="hide">
    <p>{% trans "Activating..., please wait" %}</p>
</div>

{% endblock %}

{% block extra_script %}
<script type="text/javascript">
$('#search-user-form').submit(function() {
    if (!$.trim($('[name="email"]', $(this)).val())) {
        return false;
    }
});

{% include "sysadmin/useradmin_js.html" %}

</script>
{% endblock %}
