diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index fd008433d..6f6674799 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -2810,8 +2810,11 @@ class UserList(Templated): destination = "friend" remove_action = "unfriend" - def __init__(self, editable=True): + def __init__(self, editable=True, addable=None): self.editable = editable + if addable is None: + addable = editable + self.addable = addable Templated.__init__(self) def user_row(self, row_type, user, editable=True): @@ -2894,8 +2897,8 @@ class EnemyList(UserList): type = 'enemy' cells = ('user', 'remove') - def __init__(self, editable=True): - UserList.__init__(self, editable) + def __init__(self, editable=True, addable=False): + UserList.__init__(self, editable, addable) @property def table_title(self): diff --git a/r2/r2/templates/modlist.html b/r2/r2/templates/modlist.html index 41337f5a2..b995b7842 100644 --- a/r2/r2/templates/modlist.html +++ b/r2/r2/templates/modlist.html @@ -52,7 +52,7 @@ %if thing.can_force_add: ${add_form(thing.form_title, thing.destination, thing.type, thing.container_name)} %endif - %if thing.editable: + %if thing.addable: <%call expr="add_form(thing.invite_form_title, thing.destination, thing.invite_type, thing.container_name, verb=_('invite'))"> ${error_field("ALREADY_MODERATOR", "name")} %call> diff --git a/r2/r2/templates/userlist.html b/r2/r2/templates/userlist.html index ad647f5a1..b083a4b88 100644 --- a/r2/r2/templates/userlist.html +++ b/r2/r2/templates/userlist.html @@ -69,7 +69,7 @@ %def>