Changeset 2284

Show
Ignore:
Timestamp:
06/08/05 06:32:59 (19 years ago)
Author:
jerome
Message:

Added a sum checkbox

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/dumpykota.cgi

    r2267 r2284  
    105105        print "<br />" 
    106106        print self.htmlFilterInput(" ".join(self.arguments)) 
     107        print "<br />" 
     108        print self.htmlSumCheckbox(self.options.get("sum", "")) 
    107109        print footer % (_("Dump"), version.__doc__, version.__copyright__, version.__author__) 
    108110         
     
    132134        """Input the optional dump filter.""" 
    133135        return _("Filter") + (' : <input type="text" name="filter" size="40" value="%s" /> <em>e.g. <strong>username=jerome printername=HP2100</strong></em>' % (value or "")) 
     136         
     137    def htmlSumCheckbox(self, checked="") :     
     138        """Input the optional Sum option.""" 
     139        return _("Summarize") + (' : <input type="checkbox" name="sum" %s />' % (checked and 'checked="checked"')) 
    134140         
    135141    def guiAction(self) : 
     
    148154                    if self.form.has_key("filter") :     
    149155                        self.arguments = self.form["filter"].value.split() 
    150                          
     156                    if self.form.has_key("sum") :     
     157                        self.options["sum"] = self.form["sum"].value 
    151158                    # when no authentication is done, or when the remote username     
    152159                    # is 'root' (even if not run as root of course), then unrestricted