mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Stop emails falling of the end of the world #122
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
<button title="Changes to {{ change.field.verbose_name }}" type="button" class="btn btn-default btn-xs" data-container="body" data-html="true" data-trigger='hover' data-toggle="popover" data-content='
|
||||
|
||||
{% if change.new %}<div class="alert alert-success">{{change.new|linebreaksbr}}</div>{% endif %}
|
||||
{% if change.old %}<div class="alert alert-danger">{{change.old|linebreaksbr}}</div>{% endif %}
|
||||
{% if change.new %}<div class="alert alert-success {% if change.long %}overflow-ellipsis{% endif %}">{{change.new|linebreaksbr}}</div>{% endif %}
|
||||
{% if change.old %}<div class="alert alert-danger {% if change.long %}overflow-ellipsis{% endif %}">{{change.old|linebreaksbr}}</div>{% endif %}
|
||||
|
||||
'>{{ change.field.verbose_name }}</button>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import simplejson
|
||||
from reversion.models import Version
|
||||
from django.contrib.contenttypes.models import ContentType # Used to lookup the content_type
|
||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
from django.db.models import ForeignKey, IntegerField
|
||||
from django.db.models import ForeignKey, IntegerField, EmailField
|
||||
|
||||
from RIGS import models, forms
|
||||
import datetime
|
||||
@@ -50,7 +50,13 @@ def model_compare(oldObj, newObj, excluded_keys=[]):
|
||||
|
||||
@property
|
||||
def new(self):
|
||||
return self.display_value(self._new)
|
||||
return self.display_value(self._new)
|
||||
|
||||
@property
|
||||
def long(self):
|
||||
if isinstance(self.field, EmailField):
|
||||
return True
|
||||
return False
|
||||
|
||||
changes = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user