Ticket #2839 (new enhancement)
require username, comment when changing stuff
| Reported by: | joramagten@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | low | Milestone: | 1.0 |
| Component: | general | Version: | 0.9.3 |
| Severity: | minor | Keywords: | tracobject author comment |
| Cc: | joramagten@… |
Description
when editing a wiki page, roadmap, timeline, ... require an author and comment
this to force users to add comments when committing I edited the function save in source:trunk/trac/wiki/model.py
def save(self, author, comment, remote_addr, t=None, db=None):
...
if t is None:
t = time.time()
if author == None or author == "" :
raise TracError('Author field is empty')
if comment == None or comment == "" :
raise TracError('Comment field is empty')
if self.text != self.old_text:
cursor = db.cursor()
...
also in source:/trunk/templates/wiki.cs " (optional)" should be removed
248 <div class="field"> 249 <label>Comment about this change (optional):<br /> 250 <input id="comment" type="text" name="comment" size="60" value="<?cs 251 var:wiki.comment?>" /></label> 252 </div><br />
- maybe this should better be done with an option in the config file
- it might also be better to handle this in the POST processing of the form and color the field RED?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
