Zine

open source content publishing system


Changeset 1355:e0c075084dc8


Ignore:
Timestamp:
10/18/09 21:45:39 (3 years ago)
Author:
Jonas Fietz <info@…>
Branch:
default
Message:

Don't ask what to do with posts if the author has none.

Location:
zine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zine/forms.py

    r1255 r1355  
    910910 
    911911    def context_validate(self, data): 
     912        if self.user.posts.count() is 0: 
     913            data['action'] = None 
    912914        if data['action'] == 'reassign' and not data['reassign_to']: 
    913915            # XXX: Bad wording 
  • zine/templates/admin/delete_user.html

    r524 r1355  
    77      Do you really want to delete the user “{{ username }}”? 
    88    {% endtrans %}</p> 
     9 
     10    {%- if form.user.posts.count() > 0 %} 
    911    <p>{% trans post_count=form.user.posts.count() %} 
    1012      What should happen to the {{ post_count }} post this user wrote? 
     
    1416    {{ form.action() }} 
    1517    <p>{{ form.reassign_to.label() }}: {{ form.reassign_to() }} 
     18    {%- endif %} 
     19 
    1620    <div class="actions"> 
    1721      <input type="submit" name="cancel" value="{{ _('No') }}"> 
Note: See TracChangeset for help on using the changeset viewer.