[odrs-web] Allow specifying all locales



commit 610757384363b38d38495c31694b8249eec50199
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 7 17:07:21 2017 +0100

    Allow specifying all locales

 app/templates/modadmin.html |    2 +-
 app/views_admin.py          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/templates/modadmin.html b/app/templates/modadmin.html
index a091215..3d09bad 100644
--- a/app/templates/modadmin.html
+++ b/app/templates/modadmin.html
@@ -16,7 +16,7 @@
       <td><input type="text" class="form-control" name="user_hash" value="{{u.user_hash}}" required></td>
     </tr>
     <tr>
-      <td>Languages Spoken<br/>(e.g. <code>en,fr,pl</code>):</td>
+      <td>Languages Spoken<br/>(e.g. <code>en,fr,pl</code> or <code>*</code>):</td>
       <td><input type="text" class="form-control" name="locales" value="{{u.locales}}" required></td>
     </tr>
     <tr>
diff --git a/app/views_admin.py b/app/views_admin.py
index f9c6032..e7d2487 100644
--- a/app/views_admin.py
+++ b/app/views_admin.py
@@ -375,7 +375,7 @@ def admin_show_all(page):
 
     # filter by the languages the moderator understands
     reviews = []
-    if not current_user or current_user.locales == None:
+    if not current_user or current_user.locales == None or current_user.locales == '*':
         reviews.extend(reviews_all)
     else:
         langs = current_user.locales.split(',')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]