diff options
Diffstat (limited to 'ishtar_common/forms_common.py')
| -rw-r--r-- | ishtar_common/forms_common.py | 15 | 
1 files changed, 9 insertions, 6 deletions
| diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index b461d6266..47a282ab7 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -44,7 +44,8 @@ from ishtar_common.templatetags.link_to_window import simple_link_to_window  from forms import FinalForm, FormSet, reverse_lazy, name_validator, \      TableSelect, ManageOldType, CustomForm, FieldType, FormHeader, \      FormSetWithDeleteSwitches, IshtarForm, get_data_from_formset -from ishtar_common.utils import is_downloadable, clean_session_cache +from ishtar_common.utils import is_downloadable, clean_session_cache, \ +    max_size_help  from archaeological_operations.models import Operation  from archaeological_context_records.models import ContextRecord @@ -1072,11 +1073,13 @@ class MergeOrganizationForm(MergeForm):  def get_image_help():      if not settings.IMAGE_MAX_SIZE: -        return "" -    return _(u"<p>Heavy images are resized to: %(width)dx%(height)d " -             u"(ratio is preserved).</p>") \ +        return max_size_help() +    return unicode( +        _(u"Heavy images are resized to: %(width)dx%(height)d " +             u"(ratio is preserved).") \             % {'width': settings.IMAGE_MAX_SIZE[0], -              'height': settings.IMAGE_MAX_SIZE[1]} +              'height': settings.IMAGE_MAX_SIZE[1]}) + " " + unicode( +        max_size_help())  ####################### @@ -1108,7 +1111,7 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType):          max_length=255, required=False, widget=widgets.ImageFileInput())      associated_file = forms.FileField(          label=pgettext(u"Not directory", u"File"), max_length=255, -        required=False) +        required=False, help_text=max_size_help())      reference = forms.CharField(          label=_(u"Reference"),          validators=[validators.MaxLengthValidator(100)], required=False) | 
