{% extends "sysadmin/base.html" %}
{% load seahub_tags i18n %}

{% block cur_users %}tab-cur{% endblock %}

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

<form id="search-user-form" method="get" action=".">
  <label>{% trans "Email" %}</label><br />
  <input type="text" name="email" class="input" value="{{email}}" /><br />
  <input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>
<div class="ovhd">
    <h3 class="fleft">{% trans "Result"%}</h3>
    <div class="js-op-for-selected fright hide">
        <button id="set-quota-btn">{% trans "Set quota" %}</button>
        <button id="delete-users-btn">{% trans "Delete users" %}</button>
    </div>
</div>
{% 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').on('submit', function() {
    if (!$.trim($('[name="email"]', $(this)).val())) {
        return false;
    }
});

{% include "sysadmin/useradmin_js.html" %}
</script>
{% endblock %}
