1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 23:02:26 +00:00

update tip/error_msg when admin set user quota

This commit is contained in:
lian
2017-01-07 16:03:59 +08:00
parent 1d21776299
commit 7cea8a8f57
6 changed files with 21 additions and 6 deletions

View File

@@ -196,7 +196,7 @@ class Account(APIView):
space_quota_mb = int(space_quota_mb)
except ValueError:
return api_error(status.HTTP_400_BAD_REQUEST,
'storage invalid.')
_('Must be an integer that greater than or equal to 0.'))
if space_quota_mb < 0:
return api_error(status.HTTP_400_BAD_REQUEST,

View File

@@ -52,7 +52,10 @@
<h3>{% trans "Set user storage limit" %}</h3>
<input type="hidden" name="email" value="{{ email }}" />
<input type="text" name="space_quota" /> MB
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="tip">
<span>{% trans "An integer that greater than or equal to 0." %}</span><br />
<span>{% trans "Tip: 0 means default limit" %}</span>
</p>
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>

View File

@@ -31,7 +31,10 @@
<h3>{% trans "Set org storage limit" %}</h3>
<input type="hidden" name="org_id" value="{{ org.org_id }}" />
<input type="text" name="quota" /> MB
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="tip">
<span>{% trans "An integer that greater than or equal to 0." %}</span><br />
<span>{% trans "Tip: 0 means default limit" %}</span>
</p>
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>

View File

@@ -78,7 +78,10 @@
<form id="set-quota-form" method="post" action="" class="hide">{% csrf_token %}
<h3>{% trans "Set user storage limit" %}</h3>
<input type="text" name="space_quota" /> MB
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="tip">
<span>{% trans "An integer that greater than or equal to 0." %}</span><br />
<span>{% trans "Tip: 0 means default limit" %}</span>
</p>
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>

View File

@@ -109,7 +109,10 @@
<form id="set-quota-form" method="post" action="" class="hide">{% csrf_token %}
<h3>{% trans "Set user storage limit" %}</h3>
<input type="text" name="space_quota" /> MB
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="tip">
<span>{% trans "An integer that greater than or equal to 0." %}</span><br />
<span>{% trans "Tip: 0 means default limit" %}</span>
</p>
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>

View File

@@ -101,7 +101,10 @@
<form id="set-quota-form" method="post" class="hide">{% csrf_token %}
<h3>{% trans "Set user storage limit" %}</h3>
<input type="text" name="space_quota" /> MB
<p class="tip">{% trans "Tip: 0 means default limit" %}</p>
<p class="tip">
<span>{% trans "An integer that greater than or equal to 0." %}</span><br />
<span>{% trans "Tip: 0 means default limit" %}</span>
</p>
<p class="error hide"></p>
<input type="submit" value="{% trans "Submit" %}" class="submit" />
</form>