Edgewall Software

Changeset 17737

Timestamp:
Oct 30, 2023, 12:26:06 PM (9 months ago)
Author:
Dirk Stöcker
Message:

convert user admin pages

Location:
plugins/trunk/spam-filter
Files:
14 edited
1 moved

Legend:

Unmodified
Added
Removed
  • plugins/trunk/spam-filter/setup.py

    r17736 r17737  
    5252    extras_require={
    5353        'dns': ['dnspython>=1.3.5'],
     54
    5455        #'spambayes': ['spambayes'],
    5556        'pillow': ['pillow>=2'],
     
    7273        spamfilter.botscout = tracspamfilter.filters.botscout
    7374        spamfilter.fspamlist = tracspamfilter.filters.fspamlist
    74         spamfilter.bayes = tracspamfilter.filters.bayes[spambayes]
     75        spamfilter.bayes = tracspamfilter.filters.bayes
    7576        spamfilter.extlinks = tracspamfilter.filters.extlinks
    7677        spamfilter.httpbl = tracspamfilter.filters.httpbl[dns]
  • plugins/trunk/spam-filter/spambayes_/Options.py

    r17736 r17737  
    2828
    2929# Grab the stuff from the core options class.
    30 from spambayes.OptionsClass import *
     30from spambayes.OptionsClass import *
    3131
    3232# A little magic.  We'd like to use ZODB as the default storage,
  • plugins/trunk/spam-filter/spambayes_/__init__.py

    r17736 r17737  
    33import pkg_resources
    44
    5 __version__ = "3.1.0 internal"
     5__version__ = "3.1.0 "
    66__date__ = "June 2, 2022"
  • plugins/trunk/spam-filter/spambayes_/chi2.py

    r17736 r17737  
    9191
    9292def main():
    93     from spambayes.Histogram import Hist
     93    from spambayes.Histogram import Hist
    9494    import sys
    9595
  • plugins/trunk/spam-filter/spambayes_/classifier.py

    r17736 r17737  
    5656# XXX ---- ends ----
    5757
    58 from spambayes.Options import options
    59 from spambayes.chi2 import chi2Q
    60 from spambayes.safepickle import pickle_read, pickle_write
     58from spambayes.Options import options
     59from spambayes.chi2 import chi2Q
     60from spambayes.safepickle import pickle_read, pickle_write
    6161
    6262LN2 = math.log(2)       # used frequently by chi-combining
     
    547547        # XXX Someone smarter than me, please figure out the right
    548548        # XXX way to do this.
    549         from spambayes.FileCorpus import ExpiryFileCorpus, FileMessageFactory
     549        from spambayes.FileCorpus import ExpiryFileCorpus, FileMessageFactory
    550550
    551551        username = options["globals", "proxy_username"]
     
    644644            return ["url:non_resolving"]
    645645       
    646         from spambayes.tokenizer import Tokenizer
     646        from spambayes.tokenizer import Tokenizer
    647647
    648648        if options["URLRetriever", "x-only_slurp_base"]:
  • plugins/trunk/spam-filter/spambayes_/mboxutils.py

    r17736 r17737  
    119119       
    120120        from scripts.sb_imapfilter import IMAPSession, IMAPFolder
    121         from spambayes import Stats, message
    122         from spambayes.Options import options
     121        from spambayes import Stats, message
     122        from spambayes.Options import options
    123123       
    124124        sesion = IMAPSession(parts['server'])
  • plugins/trunk/spam-filter/spambayes_/safepickle.py

    r17736 r17737  
    1313    import filelock
    1414
    15 from spambayes.Options import options
     15from spambayes.Options import options
    1616
    1717def pickle_read(filename):
  • plugins/trunk/spam-filter/spambayes_/tokenizer.py

    r17736 r17737  
    1616import urllib.request, urllib.parse, urllib.error
    1717
    18 from spambayes import classifier
    19 from spambayes.Options import options
    20 
    21 from spambayes.mboxutils import get_message
     18from spambayes import classifier
     19from spambayes.Options import options
     20
     21from spambayes.mboxutils import get_message
    2222
    2323try:
    24     from spambayes import dnscache
     24    from spambayes import dnscache
    2525    cache = dnscache.cache(cachefile=options["Tokenizer", "lookup_ip_cache"])
    2626    cache.printStatsAtEnd = False
     
    16231623        if options["Tokenizer", "crack_images"]:
    16241624            engine_name = options["Tokenizer", 'ocr_engine']
    1625             from spambayes.ImageStripper import crack_images
     1625            from spambayes.ImageStripper import crack_images
    16261626            text, tokens = crack_images(engine_name, parts)
    16271627            for t in tokens:
  • plugins/trunk/spam-filter/tracspamfilter/admin.py

    r17736 r17737  
    106106                })
    107107                add_script(req, 'spamfilter/adminmonitor.js')
    108                 add_script_data(req, {'toggleform': 'spammonitorform'})
    109108
    110109        add_stylesheet(req, 'spamfilter/admin.css')
  • plugins/trunk/spam-filter/tracspamfilter/adminreport.py

    r17729 r17737  
    1616from trac.core import Component, implements
    1717from trac.web.api import HTTPNotFound
    18 from trac.web.chrome import (
    19     add_link, add_script, add_script_data, add_stylesheet)
     18from trac.web.chrome import add_link, add_stylesheet
    2019
    2120from tracspamfilter.api import _
     
    113112                     _('Next Page'))
    114113
    115         if entries:
    116             add_script_data(req, {'toggleform': "spamreportform"})
    117114        return {
    118115            'entries': entries,
  • plugins/trunk/spam-filter/tracspamfilter/filters/bayes.py

    r17736 r17737  
    2222from tracspamfilter.api import IFilterStrategy, N_
    2323
    24 from spambayes.classifier import Classifier
    25 from spambayes.tokenizer import tokenize
     24try:
     25    from spambayes.classifier import Classifier
     26    from spambayes.tokenizer import tokenize
     27except ImportError: # not installed, use internal copy
     28    from spambayes_.classifier import Classifier
     29    from spambayes_.tokenizer import tokenize
    2630
    2731class BayesianFilterStrategy(Component):
     
    104108
    105109    def get_system_info(self):
    106         import spambayes
    107         yield 'SpamBayes', get_pkginfo(spambayes)['version']
     110        try:
     111            import spambayes
     112            yield 'SpamBayes', get_pkginfo(spambayes)['version']
     113        except ImportError: # not installed, use internal copy
     114            import spambayes_
     115            yield 'SpamBayes', spambayes_.__version__
    108116
    109117    # Internal methods
  • plugins/trunk/spam-filter/tracspamfilter/filters/trapfield.py

    r17733 r17737  
    5353    anchors =  {
    5454           'wiki_edit_form.html':  '<input type="submit" id="save" name="save" ',
    55            'ticket.html':          '<input type="submit" name="submit"'
     55           'ticket.html':          '<input type="submit" name="submit"',
     56           'prefs.html':           '<input type="hidden" name="action" value="save"'
    5657           # missing /register (accountmanager)
    5758           }
  • plugins/trunk/spam-filter/tracspamfilter/templates/admin_user.html

    r16685 r17737  
    1 <!DOCTYPE html
    2     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    4 <html xmlns="http://www.w3.org/1999/xhtml"
    5       xmlns:xi="http://www.w3.org/2001/XInclude"
    6       xmlns:py="http://genshi.edgewall.org/"
    7       xmlns:i18n="http://genshi.edgewall.org/i18n" i18n:domain="tracspamfilter">
    8   <xi:include href="admin.html" />
     1{# Copyright (C) 2023 Dirk Stöcker
     2
     3  This software is licensed as described in the file COPYING, which
     4  you should have received as part of this distribution. The terms
     5  are also available at https://trac.edgewall.org/wiki/TracLicense.
     6
     7  This software consists of voluntary contributions made by many
     8  individuals. For the exact contribution history, see the revision
     9  history and logs, available at https://trac.edgewall.org/.
     10#}
     11# extends 'admin.html'
     12<!DOCTYPE html>
     13<html>
    914  <head>
    10     <title>Spam User Handling</title>
     15    <title>
     16    # block admintitle
     17    ${_("Spam User Handling")}
     18    # endblock admintitle
     19    </title>
    1120  </head>
    1221
    1322  <body>
    14     <h2 i18n:msg="type, count">Spam Filtering: User handling (${usertype})
    15        <span class="entryinfo" py:if="stats">${entrytext}</span>
     23    # block adminpanel
     24    <h2>${_("Spam Filtering: User handling (%(type)s)") % {'type': usertype}}
     25       # if stats:
     26       <span class="entryinfo">${entrytext}</span>
     27       # endif
    1628    </h2>
    1729
    1830    <div class="nav">
    1931      <ul>
    20         <li class="first"><a href="user?mode=overview">Overview</a></li>
    21         <li><a href="user?mode=all">All</a></li>
    22         <li><a href="user?mode=authorized">Registered</a></li>
    23         <li py:if="accmgr"><a href="user?mode=unusedmulti">Unused [multi selection]</a></li>
    24         <li class="last"><a href="user?mode=unused">Unused</a></li>
     32        <li class="first"><a href="user?mode=overview">${_("Overview")}</a></li>
     33        <li><a href="user?mode=all">${_("All")}</a></li>
     34        <li><a href="user?mode=authorized">${_("Registered")}</a></li>
     35        # if accmgr:
     36        <li><a href="user?mode=unusedmulti">${_("Unused [multi selection]")}</a></li>
     37        # endif
     38        <li class="last"><a href="user?mode=unused">${_("Unused")}</a></li>
    2539      </ul>
    2640    </div>
    2741
    28     <div py:if="stats" i18n:msg="total, registered, unused">There are ${stats['numtotal']}
    29     different entries in the database, ${stats['numauthorized']} users are
    30     registered and ${stats['numunused']} have not been used.</div>
     42    # if stats:
     43    <div>
     44    ${_("There are %(total)s different entries in the database, %(registered)s users are registered and %(unused)s have not been used.")
     45    % {'total': stats['numtotal'], 'registered': stats['numauthorized'], 'unused': stats['numunused']}}</div>
     46    # endif
    3147
    32     <table class="listing" id="userinfo" py:if="username">
     48    # if username:
     49    <table class="listing" id="userinfo">
    3350      <thead>
    3451        <tr>
    35           <th>Date</th>
    36           <th i18n:msg="username">Action of user '${username}'</th>
     52          <th></th>
     53          <th</th>
    3754        </tr>
    3855      </thead>
    3956      <tbody>
    40         <py:for each="date, link, action in user">
    41           <tr>
    42             <td>${format_datetime(date) if date else "-"}</td>
    43             <td py:if="link"><a href="${href(link)}">${action}</a></td>
    44             <td py:if="not link">${action}</td>
    45           </tr>
    46         </py:for>
     57        # for date, link, action in user:
     58        <tr>
     59          <td>${format_datetime(date) if date else "-"}</td>
     60          # if link:
     61          <td><a href="${href(link)}">${action}</a></td>
     62          # else:
     63          <td>${action}</td>
     64          #endif
     65        </tr>
     66        # endfor
    4767      </tbody>
    4868    </table>
    49     <py:choose test="accmgr and mode == 'unusedmulti'">
    50       <py:when test="True">
    51         <form action="${href.admin('accounts/users')}" method="post">
    52           <xi:include href="usertable.html" />
    53           <div class="buttons">
    54             <input type="hidden" name="mode" value="$mode" />
    55             <input class="dangerbutton" type="submit" name="remove"
    56                    value="${dgettext('tracspamfilter', 'Remove selected')}" />
    57           </div>
    58         </form>
    59       </py:when>
    60       <py:otherwise><xi:include href="usertable.html" /></py:otherwise>
    61     </py:choose>
     69    # endif
     70    # if accmgr and mode == 'unusedmulti':
     71    <script type="text/javascript">
     72      jQuery(function($) {
     73        $("#userform").addSelectAllCheckboxes();
     74      });
     75    </script>
     76    <form id="userform" method="post" action="${href.admin('accounts/users')}">
     77      ${jmacros.form_token_input()}
     78      # include 'usertable.html'
     79      <div class="buttons">
     80        <input type="hidden" name="mode" value="$mode" />
     81        # if users:
     82        <input class="dangerbutton" type="submit" name="remove"
     83               value="${_('Remove selected')}" />
     84        # endif
     85      </div>
     86    </form>
     87    # else:
     88    # include 'usertable.html'
     89    # endif
    6290
    6391    <form method="post" action="">
    64       <h4 py:if="encoded">Values must be URL encoded!</h4>
     92      ${jmacros.form_token_input()}
     93      # if encoded:
     94      <h4>${_("Values must be URL encoded!")}</h4>
     95      #endif
    6596      <div class="buttons">
    66         <label>Old user:
     97        <label>
    6798          <input type="text" id="userold" name="userold" size="30" value="" />
    6899        </label>
    69         <label>New user:
     100        <label>
    70101           <input type="text" id="usernew" name="usernew" size="30" value="" />
    71102        </label>
    72103        <input type="hidden" name="mode" value="$mode" />
    73         <input py:if="encoded" type="hidden" name="encoded" value="1" />
    74         <input py:if="auth" type="hidden" name="auth" value="$auth" />
    75         <input type="submit" name="changeuser" value="${dgettext('tracspamfilter', 'Change unauthorized user')
    76                                                         if not auth else dgettext('tracspamfilter', 'Change user')}" />
     104        # if encoded:
     105        <input type="hidden" name="encoded" value="1" />
     106        # endif
     107        # if auth:
     108        <input type="hidden" name="auth" value="$auth" />
     109        # endif
     110        <input type="submit" name="changeuser" value="${_('Change unauthorized user')
     111                                                        if not auth else _('Change user')}" />
    77112      </div>
    78113    </form>
     
    80115    <div class="buttons">
    81116      <form method="post" action=""><div>
     117
    82118        <input type="hidden" name="mode" value="$mode" />
    83         <input type="submit" name="cleantemp" value="${dngettext('tracspamfilter', 'Remove %(num)s temporary session',
     119        <input type="submit" name="cleantemp" value="${'Remove %(num)s temporary session',
    84120                                                                 'Remove %(num)s temporary sessions', tempcount)}" />
    85121      </div></form>
    86122      <form method="post" action=""><div>
     123
    87124        <input type="hidden" name="mode" value="$mode" />
    88         <input type="submit" name="fixemails" value="${dgettext('tracspamfilter', 'Convert emails to registered usernames')}" />
     125        <input type="submit" name="fixemails" value="${'Convert emails to registered usernames')}" />
    89126      </div></form>
    90127    </div>
    91 
     128  # endblock adminpanel
    92129  </body>
    93 
    94130</html>
  • plugins/trunk/spam-filter/tracspamfilter/templates/usertable.html

    r17728 r17737  
    1 <!DOCTYPE html
    2     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    4 <html xmlns="http://www.w3.org/1999/xhtml"
    5       xmlns:xi="http://www.w3.org/2001/XInclude"
    6       xmlns:py="http://genshi.edgewall.org/"
    7       xmlns:i18n="http://genshi.edgewall.org/i18n" i18n:domain="tracspamfilter"
    8       py:strip="">
    9     <table class="listing" id="userstatistics" py:if="len(users)">
     1{# Copyright (C) 2023 Dirk Stöcker
     2
     3  This software is licensed as described in the file COPYING, which
     4  you should have received as part of this distribution. The terms
     5  are also available at https://trac.edgewall.org/wiki/TracLicense.
     6
     7  This software consists of voluntary contributions made by many
     8  individuals. For the exact contribution history, see the revision
     9  history and logs, available at https://trac.edgewall.org/.
     10#}
     11    # if len(users):
     12    <table class="listing" id="userstatistics">
    1013      <thead>
    1114        <tr>
    12           <th py:if="accmgr and mode == 'unusedmulti'">&nbsp;</th>
    13           <th>User name</th>
    14           <th>Last login</th>
    15           <th>Registered</th>
    16           <th>Setup</th>
    17           <th>E-Mail</th>
    18           <th>Wiki edits</th>
    19           <th>Ticket edits</th>
    20           <th>SVN edits</th>
    21           <th>Other</th>
    22           <th py:if="accmgr and mode == 'unused'">&nbsp;</th>
     15          # if accmgr and mode == 'unusedmulti':
     16          <th class="sel">&nbsp;</th>
     17          # endif
     18          <th>${_("User name")}</th>
     19          <th>${_("Last login")}</th>
     20          <th>${_("Registered")}</th>
     21          <th>${_("Setup")}</th>
     22          <th>${_("E-Mail")}</th>
     23          <th>${_("Wiki edits")}</th>
     24          <th>${_("Ticket edits")}</th>
     25          <th>${_("SVN edits")}</th>
     26          <th>${_("Other")}</th>
     27          # if accmgr and mode == 'unused':
     28          <th>&nbsp;</th>
     29          # endif
    2330        </tr>
    2431      </thead>
    2532      <tbody>
    26         <py:for each="name, data in sorted(users.iteritems())">
     33       
    2734          <tr>
    28             <td py:if="accmgr and mode == 'unusedmulti'">
    29               <py:if test="not curtime-data[0] > maxage">&nbsp;</py:if>
    30               <input py:if="curtime-data[0] > maxage" type="checkbox" name="sel" value="${name}" />
     35            # if accmgr and mode == 'unusedmulti':
     36            <td class="sel">
     37              # if curtime-data[0] > maxage:
     38              <input type="checkbox" name="sel" value="${name}" />
     39              # else:
     40              &nbsp;
     41              # endif
    3142            </td>
     43
    3244            <td>
    3345              <a href="user?mode=user&amp;user=${quote(name.encode('utf-8'))}">${name}</a>
    34               <span class="username" py:if="data[12]">(${data[12]})</span>
     46              # if data[12]:
     47              <span class="username">(${data[12]})</span>
     48              # endif
    3549            </td>
    36             <py:if test="data[0]">
    37               <py:choose test="data[1]">
    38                 <py:when test="0">
    39                   <td><a href="${data[0]}">Source</a></td>
    40                 </py:when>
    41                 <py:otherwise>
    42                   <td class="${'inactive' if curtime-data[0] > maxage else 'active'}">${format_datetime(data[0])}</td>
    43                 </py:otherwise>
    44               </py:choose>
    45             </py:if>
    46             <py:if test="not data[0]"><td>-</td></py:if>
    47             <py:if test="data[1]"><td class="active">yes</td></py:if>
    48             <py:if test="not data[1]"><td>no</td></py:if>
    49             <py:if test="data[2]"><td class="active">yes<span class="entrypassword" py:if="data[14]">(password)</span></td></py:if>
    50             <py:if test="not data[2]"><td>no<span class="entrypassword" py:if="data[14]">(password)</span></td></py:if>
     50            # if data[0]:
     51              # if data[1]:
     52              <td class="${'inactive' if curtime-data[0] > maxage else 'active'}">${format_datetime(data[0])}</td>
     53              # else:
     54              <td><a href="${data[0]}">${_("Source")}</a></td>
     55              # endif
     56            # else:
     57              <td>-</td>
     58            # endif
     59            # if data[1]:
     60            <td class="active">${_("yes")}</td>
     61            # else:
     62            <td>${_("no")}</td>
     63            # endif
     64            # if data[2]:
     65            <td class="active">${_("yes")}
     66            # else:
     67            <td>${_("no")}
     68            #endif
     69            # if  data[14]:
     70            <span class="entrypassword" py:if="data[14]">${_("(password)")}</span>
     71            # endif
     72            </td>
    5173            <td>${data[3] if data[3] else '-'}
    52               <py:if test="data[13]"><span class="doublemail" title="${data[13]}"> (double)</span></py:if>
     74              # if data[13]:
     75              <span class="doublemail" title="${data[13]}"> ${_("(double)")}</span>
     76              # endif
    5377            </td>
    54             <py:choose test="data[4]">
    55               <py:when test="1"><td class="asuser">user <py:if test="data[5]"> (${data[5]})</py:if></td></py:when>
    56               <py:when test="2"><td class="${'asmailonly' if data[3] == name else 'asmail'}">e-mail <py:if test="data[5]"> (${data[5]})</py:if></td></py:when>
    57               <py:when test="3"><td class="asboth">both <py:if test="data[5]"> (${data[5]})</py:if></td></py:when>
    58               <py:otherwise><td>-</td></py:otherwise>
    59             </py:choose>
    60             <py:choose test="data[6]">
    61               <py:when test="1"><td class="asuser">user <py:if test="data[7]"> (${data[7]})</py:if></td></py:when>
    62               <py:when test="2"><td class="${'asmailonly' if data[3] == name else 'asmail'}">e-mail <py:if test="data[7]"> (${data[7]})</py:if></td></py:when>
    63               <py:when test="3"><td class="asboth">both <py:if test="data[7]"> (${data[7]})</py:if></td></py:when>
    64               <py:otherwise><td>-</td></py:otherwise>
    65             </py:choose>
    66             <py:choose test="data[8]">
    67               <py:when test="1"><td class="asuser">user <py:if test="data[9]"> (${data[9]})</py:if></td></py:when>
    68               <py:when test="2"><td class="${'asmailonly' if data[3] == name else 'asmail'}">e-mail <py:if test="data[9]"> (${data[9]})</py:if></td></py:when>
    69               <py:when test="3"><td class="asboth">both <py:if test="data[9]"> (${data[9]})</py:if></td></py:when>
    70               <py:otherwise><td>-</td></py:otherwise>
    71             </py:choose>
    72             <py:choose test="data[10]">
    73               <py:when test="1"><td class="asuser">user <py:if test="data[11]"> (${data[11]})</py:if></td></py:when>
    74               <py:when test="2"><td class="asmail">e-mail <py:if test="data[11]"> (${data[11]})</py:if></td></py:when>
    75               <py:when test="3"><td class="asboth">both <py:if test="data[11]"> (${data[11]})</py:if></td></py:when>
    76               <py:otherwise><td>-</td></py:otherwise>
    77             </py:choose>
    78             <td py:if="accmgr and mode == 'unused'">
    79               <py:if test="not curtime-data[0] > maxage">&nbsp;</py:if>
    80               <form py:if="curtime-data[0] > maxage" action="${href.admin('accounts/users')}" method="post">
     78            # if data[4] == 1:
     79            <td class="asuser">${_("user")}
     80            # if data[5]:
     81            (${data[5]})
     82            # endif
     83            </td>
     84            # elif data[4] == 2:
     85            <td class="${'asmailonly' if data[3] == name else 'asmail'}">${_("e-mail")}
     86            # if data[5]:
     87            (${data[5]})
     88            # endif
     89            </td>
     90            # elif data[4] == 3:
     91            <td class="asboth">${_("both")}
     92            # if data[5]:
     93            (${data[5]})
     94            # endif
     95            </td>
     96            # else:
     97            <td>-</td>
     98            # endif
     99            # if data[6] == 1:
     100            <td class="asuser">${_("user")}
     101            # if data[7]:
     102            (${data[7]})
     103            # endif
     104            </td>
     105            # elif data[6] == 2:
     106            <td class="${'asmailonly' if data[3] == name else 'asmail'}">${_("e-mail")}
     107            # if data[7]:
     108            (${data[7]})
     109            # endif
     110            </td>
     111            # elif data[6] == 3:
     112            <td class="asboth">${_("both")}
     113            # if data[7]:
     114            (${data[7]})
     115            # endif
     116            </td>
     117            # else:
     118            <td>-</td>
     119            # endif
     120            # if data[8] == 1:
     121            <td class="asuser">${_("user")}
     122            # if data[9]:
     123            (${data[9]})
     124            # endif
     125            </td>
     126            # elif data[8] == 2:
     127           <td class="${'asmailonly' if data[3] == name else 'asmail'}">${_("e-mail")}
     128            # if data[9]:
     129            (${data[9]})
     130            # endif
     131            </td>
     132            # elif data[8] == 3:
     133            <td class="asboth">${_("both")}
     134            # if data[9]:
     135            (${data[9]})
     136            # endif
     137            </td>
     138            # else:
     139            <td>-</td>
     140            # endif
     141            # if data[10] == 1:
     142            <td class="asuser">${_("user")}
     143            # if data[11]:
     144            (${data[11]})
     145            # endif
     146            </td>
     147            # elif data[10] == 2:
     148           <td class="${'asmailonly' if data[3] == name else 'asmail'}">${_("e-mail")}
     149            # if data[11]:
     150            (${data[11]})
     151            # endif
     152            </td>
     153            # elif data[10] == 3:
     154           <td class="asboth">${_("both")}
     155            # if data[11]:
     156            (${data[11]})
     157            # endif
     158            </td>
     159            # else:
     160            <td>-</td>
     161            # endif
     162            # if accmgr and mode == 'unused':
     163            <td>
     164              # if curtime-data[0] > maxage:
     165              <form action="${href.admin('accounts/users')}" method="post">
    81166                <div>
    82167                  <input type="hidden" name="sel" value="${name}" />
    83                   <input class="dangerbutton" type="submit" name="remove" value="${dgettext('tracspamfilter', 'Remove')}" />
     168                  <input class="dangerbutton" type="submit" name="remove" value="${'Remove')}" />
    84169                </div>
    85170              </form>
     171
     172
     173
    86174            </td>
     175
    87176          </tr>
    88         </py:for>
     177       
    89178      </tbody>
    90179    </table>
    91 </html>
     180    #endif
Note: See TracChangeset for help on using the changeset viewer.