Files
mayan-edms/apps/documents/forms.py
Roberto Rosario 4397784388 Merge branch 'hotfix/v0.12.3' into development
Conflicts:
	.gitignore
	.tx/config
	apps/acls/locale/bg/LC_MESSAGES/django.mo
	apps/acls/locale/bg/LC_MESSAGES/django.po
	apps/acls/locale/de_DE/LC_MESSAGES/django.mo
	apps/acls/locale/de_DE/LC_MESSAGES/django.po
	apps/acls/locale/en/LC_MESSAGES/django.mo
	apps/acls/locale/en/LC_MESSAGES/django.po
	apps/acls/locale/es/LC_MESSAGES/django.mo
	apps/acls/locale/es/LC_MESSAGES/django.po
	apps/acls/locale/fr/LC_MESSAGES/django.mo
	apps/acls/locale/fr/LC_MESSAGES/django.po
	apps/acls/locale/it/LC_MESSAGES/django.mo
	apps/acls/locale/it/LC_MESSAGES/django.po
	apps/acls/locale/nl_NL/LC_MESSAGES/django.mo
	apps/acls/locale/nl_NL/LC_MESSAGES/django.po
	apps/acls/locale/pl/LC_MESSAGES/django.mo
	apps/acls/locale/pl/LC_MESSAGES/django.po
	apps/acls/locale/pt/LC_MESSAGES/django.mo
	apps/acls/locale/pt/LC_MESSAGES/django.po
	apps/acls/locale/pt_BR/LC_MESSAGES/django.mo
	apps/acls/locale/pt_BR/LC_MESSAGES/django.po
	apps/acls/locale/ru/LC_MESSAGES/django.mo
	apps/acls/locale/ru/LC_MESSAGES/django.po
	apps/acls/registry.py
	apps/app_registry/__init__.py
	apps/app_registry/models.py
	apps/bootstrap/classes.py
	apps/bootstrap/exceptions.py
	apps/bootstrap/forms.py
	apps/bootstrap/links.py
	apps/bootstrap/literals.py
	apps/bootstrap/locale/bg/LC_MESSAGES/django.mo
	apps/bootstrap/locale/bg/LC_MESSAGES/django.po
	apps/bootstrap/locale/de_DE/LC_MESSAGES/django.mo
	apps/bootstrap/locale/de_DE/LC_MESSAGES/django.po
	apps/bootstrap/locale/en/LC_MESSAGES/django.mo
	apps/bootstrap/locale/en/LC_MESSAGES/django.po
	apps/bootstrap/locale/es/LC_MESSAGES/django.mo
	apps/bootstrap/locale/es/LC_MESSAGES/django.po
	apps/bootstrap/locale/fr/LC_MESSAGES/django.mo
	apps/bootstrap/locale/fr/LC_MESSAGES/django.po
	apps/bootstrap/locale/it/LC_MESSAGES/django.mo
	apps/bootstrap/locale/it/LC_MESSAGES/django.po
	apps/bootstrap/locale/nl_NL/LC_MESSAGES/django.mo
	apps/bootstrap/locale/nl_NL/LC_MESSAGES/django.po
	apps/bootstrap/locale/pl/LC_MESSAGES/django.mo
	apps/bootstrap/locale/pl/LC_MESSAGES/django.po
	apps/bootstrap/locale/pt/LC_MESSAGES/django.mo
	apps/bootstrap/locale/pt/LC_MESSAGES/django.po
	apps/bootstrap/locale/pt_BR/LC_MESSAGES/django.mo
	apps/bootstrap/locale/pt_BR/LC_MESSAGES/django.po
	apps/bootstrap/locale/ru/LC_MESSAGES/django.mo
	apps/bootstrap/locale/ru/LC_MESSAGES/django.po
	apps/bootstrap/managers.py
	apps/bootstrap/migrations/0001_initial.py
	apps/bootstrap/models.py
	apps/bootstrap/permissions.py
	apps/bootstrap/post_init.py
	apps/bootstrap/registry.py
	apps/bootstrap/static/images/icons/radioactivity.png
	apps/bootstrap/urls.py
	apps/bootstrap/utils.py
	apps/bootstrap/views.py
	apps/checkouts/locale/bg/LC_MESSAGES/django.mo
	apps/checkouts/locale/bg/LC_MESSAGES/django.po
	apps/checkouts/locale/de_DE/LC_MESSAGES/django.mo
	apps/checkouts/locale/de_DE/LC_MESSAGES/django.po
	apps/checkouts/locale/en/LC_MESSAGES/django.mo
	apps/checkouts/locale/en/LC_MESSAGES/django.po
	apps/checkouts/locale/es/LC_MESSAGES/django.mo
	apps/checkouts/locale/es/LC_MESSAGES/django.po
	apps/checkouts/locale/fr/LC_MESSAGES/django.mo
	apps/checkouts/locale/fr/LC_MESSAGES/django.po
	apps/checkouts/locale/it/LC_MESSAGES/django.mo
	apps/checkouts/locale/it/LC_MESSAGES/django.po
	apps/checkouts/locale/nl_NL/LC_MESSAGES/django.mo
	apps/checkouts/locale/nl_NL/LC_MESSAGES/django.po
	apps/checkouts/locale/pl/LC_MESSAGES/django.mo
	apps/checkouts/locale/pl/LC_MESSAGES/django.po
	apps/checkouts/locale/pt/LC_MESSAGES/django.mo
	apps/checkouts/locale/pt/LC_MESSAGES/django.po
	apps/checkouts/locale/pt_BR/LC_MESSAGES/django.mo
	apps/checkouts/locale/pt_BR/LC_MESSAGES/django.po
	apps/checkouts/locale/ru/LC_MESSAGES/django.mo
	apps/checkouts/locale/ru/LC_MESSAGES/django.po
	apps/common/__init__.py
	apps/common/locale/bg/LC_MESSAGES/django.mo
	apps/common/locale/bg/LC_MESSAGES/django.po
	apps/common/locale/de_DE/LC_MESSAGES/django.mo
	apps/common/locale/de_DE/LC_MESSAGES/django.po
	apps/common/locale/en/LC_MESSAGES/django.mo
	apps/common/locale/en/LC_MESSAGES/django.po
	apps/common/locale/es/LC_MESSAGES/django.mo
	apps/common/locale/es/LC_MESSAGES/django.po
	apps/common/locale/fr/LC_MESSAGES/django.mo
	apps/common/locale/fr/LC_MESSAGES/django.po
	apps/common/locale/it/LC_MESSAGES/django.mo
	apps/common/locale/it/LC_MESSAGES/django.po
	apps/common/locale/nl_NL/LC_MESSAGES/django.mo
	apps/common/locale/nl_NL/LC_MESSAGES/django.po
	apps/common/locale/pl/LC_MESSAGES/django.mo
	apps/common/locale/pl/LC_MESSAGES/django.po
	apps/common/locale/pt/LC_MESSAGES/django.mo
	apps/common/locale/pt/LC_MESSAGES/django.po
	apps/common/locale/pt_BR/LC_MESSAGES/django.mo
	apps/common/locale/pt_BR/LC_MESSAGES/django.po
	apps/common/locale/ru/LC_MESSAGES/django.mo
	apps/common/locale/ru/LC_MESSAGES/django.po
	apps/common/templates/generic_list_subtemplate.html
	apps/common/utils.py
	apps/common/widgets.py
	apps/converter/conf/settings.py
	apps/converter/locale/bg/LC_MESSAGES/django.mo
	apps/converter/locale/bg/LC_MESSAGES/django.po
	apps/converter/locale/de_DE/LC_MESSAGES/django.mo
	apps/converter/locale/de_DE/LC_MESSAGES/django.po
	apps/converter/locale/en/LC_MESSAGES/django.mo
	apps/converter/locale/en/LC_MESSAGES/django.po
	apps/converter/locale/es/LC_MESSAGES/django.mo
	apps/converter/locale/es/LC_MESSAGES/django.po
	apps/converter/locale/fr/LC_MESSAGES/django.mo
	apps/converter/locale/fr/LC_MESSAGES/django.po
	apps/converter/locale/it/LC_MESSAGES/django.mo
	apps/converter/locale/it/LC_MESSAGES/django.po
	apps/converter/locale/nl_NL/LC_MESSAGES/django.mo
	apps/converter/locale/nl_NL/LC_MESSAGES/django.po
	apps/converter/locale/pl/LC_MESSAGES/django.mo
	apps/converter/locale/pl/LC_MESSAGES/django.po
	apps/converter/locale/pt/LC_MESSAGES/django.mo
	apps/converter/locale/pt/LC_MESSAGES/django.po
	apps/converter/locale/pt_BR/LC_MESSAGES/django.mo
	apps/converter/locale/pt_BR/LC_MESSAGES/django.po
	apps/converter/locale/ru/LC_MESSAGES/django.mo
	apps/converter/locale/ru/LC_MESSAGES/django.po
	apps/converter/office_converter.py
	apps/converter/utils.py
	apps/django_gpg/locale/bg/LC_MESSAGES/django.mo
	apps/django_gpg/locale/bg/LC_MESSAGES/django.po
	apps/django_gpg/locale/de_DE/LC_MESSAGES/django.mo
	apps/django_gpg/locale/de_DE/LC_MESSAGES/django.po
	apps/django_gpg/locale/en/LC_MESSAGES/django.mo
	apps/django_gpg/locale/en/LC_MESSAGES/django.po
	apps/django_gpg/locale/es/LC_MESSAGES/django.mo
	apps/django_gpg/locale/es/LC_MESSAGES/django.po
	apps/django_gpg/locale/fr/LC_MESSAGES/django.mo
	apps/django_gpg/locale/fr/LC_MESSAGES/django.po
	apps/django_gpg/locale/it/LC_MESSAGES/django.mo
	apps/django_gpg/locale/it/LC_MESSAGES/django.po
	apps/django_gpg/locale/nl_NL/LC_MESSAGES/django.mo
	apps/django_gpg/locale/nl_NL/LC_MESSAGES/django.po
	apps/django_gpg/locale/pl/LC_MESSAGES/django.mo
	apps/django_gpg/locale/pl/LC_MESSAGES/django.po
	apps/django_gpg/locale/pt/LC_MESSAGES/django.mo
	apps/django_gpg/locale/pt/LC_MESSAGES/django.po
	apps/django_gpg/locale/pt_BR/LC_MESSAGES/django.mo
	apps/django_gpg/locale/pt_BR/LC_MESSAGES/django.po
	apps/django_gpg/locale/ru/LC_MESSAGES/django.mo
	apps/django_gpg/locale/ru/LC_MESSAGES/django.po
	apps/document_comments/locale/bg/LC_MESSAGES/django.mo
	apps/document_comments/locale/bg/LC_MESSAGES/django.po
	apps/document_comments/locale/de_DE/LC_MESSAGES/django.mo
	apps/document_comments/locale/de_DE/LC_MESSAGES/django.po
	apps/document_comments/locale/en/LC_MESSAGES/django.mo
	apps/document_comments/locale/en/LC_MESSAGES/django.po
	apps/document_comments/locale/es/LC_MESSAGES/django.mo
	apps/document_comments/locale/es/LC_MESSAGES/django.po
	apps/document_comments/locale/fr/LC_MESSAGES/django.mo
	apps/document_comments/locale/fr/LC_MESSAGES/django.po
	apps/document_comments/locale/it/LC_MESSAGES/django.mo
	apps/document_comments/locale/it/LC_MESSAGES/django.po
	apps/document_comments/locale/nl_NL/LC_MESSAGES/django.mo
	apps/document_comments/locale/nl_NL/LC_MESSAGES/django.po
	apps/document_comments/locale/pl/LC_MESSAGES/django.mo
	apps/document_comments/locale/pl/LC_MESSAGES/django.po
	apps/document_comments/locale/pt/LC_MESSAGES/django.mo
	apps/document_comments/locale/pt/LC_MESSAGES/django.po
	apps/document_comments/locale/pt_BR/LC_MESSAGES/django.mo
	apps/document_comments/locale/pt_BR/LC_MESSAGES/django.po
	apps/document_comments/locale/ru/LC_MESSAGES/django.mo
	apps/document_comments/locale/ru/LC_MESSAGES/django.po
	apps/document_indexing/__init__.py
	apps/document_indexing/locale/bg/LC_MESSAGES/django.mo
	apps/document_indexing/locale/bg/LC_MESSAGES/django.po
	apps/document_indexing/locale/de_DE/LC_MESSAGES/django.mo
	apps/document_indexing/locale/de_DE/LC_MESSAGES/django.po
	apps/document_indexing/locale/en/LC_MESSAGES/django.mo
	apps/document_indexing/locale/en/LC_MESSAGES/django.po
	apps/document_indexing/locale/es/LC_MESSAGES/django.mo
	apps/document_indexing/locale/es/LC_MESSAGES/django.po
	apps/document_indexing/locale/fr/LC_MESSAGES/django.mo
	apps/document_indexing/locale/fr/LC_MESSAGES/django.po
	apps/document_indexing/locale/it/LC_MESSAGES/django.mo
	apps/document_indexing/locale/it/LC_MESSAGES/django.po
	apps/document_indexing/locale/nl_NL/LC_MESSAGES/django.mo
	apps/document_indexing/locale/nl_NL/LC_MESSAGES/django.po
	apps/document_indexing/locale/pl/LC_MESSAGES/django.mo
	apps/document_indexing/locale/pl/LC_MESSAGES/django.po
	apps/document_indexing/locale/pt/LC_MESSAGES/django.mo
	apps/document_indexing/locale/pt/LC_MESSAGES/django.po
	apps/document_indexing/locale/pt_BR/LC_MESSAGES/django.mo
	apps/document_indexing/locale/pt_BR/LC_MESSAGES/django.po
	apps/document_indexing/locale/ru/LC_MESSAGES/django.mo
	apps/document_indexing/locale/ru/LC_MESSAGES/django.po
	apps/document_indexing/models.py
	apps/document_indexing/registry.py
	apps/document_indexing/urls.py
	apps/document_indexing/views.py
	apps/document_signatures/locale/bg/LC_MESSAGES/django.mo
	apps/document_signatures/locale/bg/LC_MESSAGES/django.po
	apps/document_signatures/locale/de_DE/LC_MESSAGES/django.mo
	apps/document_signatures/locale/de_DE/LC_MESSAGES/django.po
	apps/document_signatures/locale/en/LC_MESSAGES/django.mo
	apps/document_signatures/locale/en/LC_MESSAGES/django.po
	apps/document_signatures/locale/es/LC_MESSAGES/django.mo
	apps/document_signatures/locale/es/LC_MESSAGES/django.po
	apps/document_signatures/locale/fr/LC_MESSAGES/django.mo
	apps/document_signatures/locale/fr/LC_MESSAGES/django.po
	apps/document_signatures/locale/it/LC_MESSAGES/django.mo
	apps/document_signatures/locale/it/LC_MESSAGES/django.po
	apps/document_signatures/locale/nl_NL/LC_MESSAGES/django.mo
	apps/document_signatures/locale/nl_NL/LC_MESSAGES/django.po
	apps/document_signatures/locale/pl/LC_MESSAGES/django.mo
	apps/document_signatures/locale/pl/LC_MESSAGES/django.po
	apps/document_signatures/locale/pt/LC_MESSAGES/django.mo
	apps/document_signatures/locale/pt/LC_MESSAGES/django.po
	apps/document_signatures/locale/pt_BR/LC_MESSAGES/django.mo
	apps/document_signatures/locale/pt_BR/LC_MESSAGES/django.po
	apps/document_signatures/locale/ru/LC_MESSAGES/django.mo
	apps/document_signatures/locale/ru/LC_MESSAGES/django.po
	apps/documents/__init__.py
	apps/documents/forms.py
	apps/documents/locale/bg/LC_MESSAGES/django.mo
	apps/documents/locale/bg/LC_MESSAGES/django.po
	apps/documents/locale/de_DE/LC_MESSAGES/django.mo
	apps/documents/locale/de_DE/LC_MESSAGES/django.po
	apps/documents/locale/en/LC_MESSAGES/django.mo
	apps/documents/locale/en/LC_MESSAGES/django.po
	apps/documents/locale/es/LC_MESSAGES/django.mo
	apps/documents/locale/es/LC_MESSAGES/django.po
	apps/documents/locale/fr/LC_MESSAGES/django.mo
	apps/documents/locale/fr/LC_MESSAGES/django.po
	apps/documents/locale/it/LC_MESSAGES/django.mo
	apps/documents/locale/it/LC_MESSAGES/django.po
	apps/documents/locale/nl_NL/LC_MESSAGES/django.mo
	apps/documents/locale/nl_NL/LC_MESSAGES/django.po
	apps/documents/locale/pl/LC_MESSAGES/django.mo
	apps/documents/locale/pl/LC_MESSAGES/django.po
	apps/documents/locale/pt/LC_MESSAGES/django.mo
	apps/documents/locale/pt/LC_MESSAGES/django.po
	apps/documents/locale/pt_BR/LC_MESSAGES/django.mo
	apps/documents/locale/pt_BR/LC_MESSAGES/django.po
	apps/documents/locale/ru/LC_MESSAGES/django.mo
	apps/documents/locale/ru/LC_MESSAGES/django.po
	apps/documents/managers.py
	apps/documents/migrations/0015_auto__add_unique_documenttype_name.py
	apps/documents/models.py
	apps/documents/registry.py
	apps/dynamic_search/locale/bg/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/bg/LC_MESSAGES/django.po
	apps/dynamic_search/locale/de_DE/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/de_DE/LC_MESSAGES/django.po
	apps/dynamic_search/locale/en/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/en/LC_MESSAGES/django.po
	apps/dynamic_search/locale/es/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/es/LC_MESSAGES/django.po
	apps/dynamic_search/locale/fr/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/fr/LC_MESSAGES/django.po
	apps/dynamic_search/locale/it/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/it/LC_MESSAGES/django.po
	apps/dynamic_search/locale/nl_NL/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/nl_NL/LC_MESSAGES/django.po
	apps/dynamic_search/locale/pl/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/pl/LC_MESSAGES/django.po
	apps/dynamic_search/locale/pt/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/pt/LC_MESSAGES/django.po
	apps/dynamic_search/locale/pt_BR/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/pt_BR/LC_MESSAGES/django.po
	apps/dynamic_search/locale/ru/LC_MESSAGES/django.mo
	apps/dynamic_search/locale/ru/LC_MESSAGES/django.po
	apps/dynamic_search/registry.py
	apps/folders/__init__.py
	apps/folders/locale/bg/LC_MESSAGES/django.mo
	apps/folders/locale/bg/LC_MESSAGES/django.po
	apps/folders/locale/de_DE/LC_MESSAGES/django.mo
	apps/folders/locale/de_DE/LC_MESSAGES/django.po
	apps/folders/locale/en/LC_MESSAGES/django.mo
	apps/folders/locale/en/LC_MESSAGES/django.po
	apps/folders/locale/es/LC_MESSAGES/django.mo
	apps/folders/locale/es/LC_MESSAGES/django.po
	apps/folders/locale/fr/LC_MESSAGES/django.mo
	apps/folders/locale/fr/LC_MESSAGES/django.po
	apps/folders/locale/it/LC_MESSAGES/django.mo
	apps/folders/locale/it/LC_MESSAGES/django.po
	apps/folders/locale/nl_NL/LC_MESSAGES/django.mo
	apps/folders/locale/nl_NL/LC_MESSAGES/django.po
	apps/folders/locale/pl/LC_MESSAGES/django.mo
	apps/folders/locale/pl/LC_MESSAGES/django.po
	apps/folders/locale/pt/LC_MESSAGES/django.mo
	apps/folders/locale/pt/LC_MESSAGES/django.po
	apps/folders/locale/pt_BR/LC_MESSAGES/django.mo
	apps/folders/locale/pt_BR/LC_MESSAGES/django.po
	apps/folders/locale/ru/LC_MESSAGES/django.mo
	apps/folders/locale/ru/LC_MESSAGES/django.po
	apps/folders/registry.py
	apps/history/locale/bg/LC_MESSAGES/django.mo
	apps/history/locale/bg/LC_MESSAGES/django.po
	apps/history/locale/de_DE/LC_MESSAGES/django.mo
	apps/history/locale/de_DE/LC_MESSAGES/django.po
	apps/history/locale/en/LC_MESSAGES/django.mo
	apps/history/locale/en/LC_MESSAGES/django.po
	apps/history/locale/es/LC_MESSAGES/django.mo
	apps/history/locale/es/LC_MESSAGES/django.po
	apps/history/locale/fr/LC_MESSAGES/django.mo
	apps/history/locale/fr/LC_MESSAGES/django.po
	apps/history/locale/it/LC_MESSAGES/django.mo
	apps/history/locale/it/LC_MESSAGES/django.po
	apps/history/locale/nl_NL/LC_MESSAGES/django.mo
	apps/history/locale/nl_NL/LC_MESSAGES/django.po
	apps/history/locale/pl/LC_MESSAGES/django.mo
	apps/history/locale/pl/LC_MESSAGES/django.po
	apps/history/locale/pt/LC_MESSAGES/django.mo
	apps/history/locale/pt/LC_MESSAGES/django.po
	apps/history/locale/pt_BR/LC_MESSAGES/django.mo
	apps/history/locale/pt_BR/LC_MESSAGES/django.po
	apps/history/locale/ru/LC_MESSAGES/django.mo
	apps/history/locale/ru/LC_MESSAGES/django.po
	apps/history/registry.py
	apps/installation/__init__.py
	apps/installation/locale/bg/LC_MESSAGES/django.mo
	apps/installation/locale/bg/LC_MESSAGES/django.po
	apps/installation/locale/de_DE/LC_MESSAGES/django.mo
	apps/installation/locale/de_DE/LC_MESSAGES/django.po
	apps/installation/locale/en/LC_MESSAGES/django.mo
	apps/installation/locale/en/LC_MESSAGES/django.po
	apps/installation/locale/es/LC_MESSAGES/django.mo
	apps/installation/locale/es/LC_MESSAGES/django.po
	apps/installation/locale/fr/LC_MESSAGES/django.mo
	apps/installation/locale/fr/LC_MESSAGES/django.po
	apps/installation/locale/it/LC_MESSAGES/django.mo
	apps/installation/locale/it/LC_MESSAGES/django.po
	apps/installation/locale/nl_NL/LC_MESSAGES/django.mo
	apps/installation/locale/nl_NL/LC_MESSAGES/django.po
	apps/installation/locale/pl/LC_MESSAGES/django.mo
	apps/installation/locale/pl/LC_MESSAGES/django.po
	apps/installation/locale/pt/LC_MESSAGES/django.mo
	apps/installation/locale/pt/LC_MESSAGES/django.po
	apps/installation/locale/pt_BR/LC_MESSAGES/django.mo
	apps/installation/locale/pt_BR/LC_MESSAGES/django.po
	apps/installation/locale/ru/LC_MESSAGES/django.mo
	apps/installation/locale/ru/LC_MESSAGES/django.po
	apps/installation/models.py
	apps/installation/views.py
	apps/linking/locale/bg/LC_MESSAGES/django.mo
	apps/linking/locale/bg/LC_MESSAGES/django.po
	apps/linking/locale/de_DE/LC_MESSAGES/django.mo
	apps/linking/locale/de_DE/LC_MESSAGES/django.po
	apps/linking/locale/en/LC_MESSAGES/django.mo
	apps/linking/locale/en/LC_MESSAGES/django.po
	apps/linking/locale/es/LC_MESSAGES/django.mo
	apps/linking/locale/es/LC_MESSAGES/django.po
	apps/linking/locale/fr/LC_MESSAGES/django.mo
	apps/linking/locale/fr/LC_MESSAGES/django.po
	apps/linking/locale/it/LC_MESSAGES/django.mo
	apps/linking/locale/it/LC_MESSAGES/django.po
	apps/linking/locale/nl_NL/LC_MESSAGES/django.mo
	apps/linking/locale/nl_NL/LC_MESSAGES/django.po
	apps/linking/locale/pl/LC_MESSAGES/django.mo
	apps/linking/locale/pl/LC_MESSAGES/django.po
	apps/linking/locale/pt/LC_MESSAGES/django.mo
	apps/linking/locale/pt/LC_MESSAGES/django.po
	apps/linking/locale/pt_BR/LC_MESSAGES/django.mo
	apps/linking/locale/pt_BR/LC_MESSAGES/django.po
	apps/linking/locale/ru/LC_MESSAGES/django.mo
	apps/linking/locale/ru/LC_MESSAGES/django.po
	apps/linking/registry.py
	apps/main/__init__.py
	apps/main/locale/bg/LC_MESSAGES/django.mo
	apps/main/locale/bg/LC_MESSAGES/django.po
	apps/main/locale/de_DE/LC_MESSAGES/django.mo
	apps/main/locale/de_DE/LC_MESSAGES/django.po
	apps/main/locale/en/LC_MESSAGES/django.mo
	apps/main/locale/en/LC_MESSAGES/django.po
	apps/main/locale/es/LC_MESSAGES/django.mo
	apps/main/locale/es/LC_MESSAGES/django.po
	apps/main/locale/fr/LC_MESSAGES/django.mo
	apps/main/locale/fr/LC_MESSAGES/django.po
	apps/main/locale/it/LC_MESSAGES/django.mo
	apps/main/locale/it/LC_MESSAGES/django.po
	apps/main/locale/nl_NL/LC_MESSAGES/django.mo
	apps/main/locale/nl_NL/LC_MESSAGES/django.po
	apps/main/locale/pl/LC_MESSAGES/django.mo
	apps/main/locale/pl/LC_MESSAGES/django.po
	apps/main/locale/pt/LC_MESSAGES/django.mo
	apps/main/locale/pt/LC_MESSAGES/django.po
	apps/main/locale/pt_BR/LC_MESSAGES/django.mo
	apps/main/locale/pt_BR/LC_MESSAGES/django.po
	apps/main/locale/ru/LC_MESSAGES/django.mo
	apps/main/locale/ru/LC_MESSAGES/django.po
	apps/main/templates/base.html
	apps/metadata/__init__.py
	apps/metadata/locale/bg/LC_MESSAGES/django.mo
	apps/metadata/locale/bg/LC_MESSAGES/django.po
	apps/metadata/locale/de_DE/LC_MESSAGES/django.mo
	apps/metadata/locale/de_DE/LC_MESSAGES/django.po
	apps/metadata/locale/en/LC_MESSAGES/django.mo
	apps/metadata/locale/en/LC_MESSAGES/django.po
	apps/metadata/locale/es/LC_MESSAGES/django.mo
	apps/metadata/locale/es/LC_MESSAGES/django.po
	apps/metadata/locale/fr/LC_MESSAGES/django.mo
	apps/metadata/locale/fr/LC_MESSAGES/django.po
	apps/metadata/locale/it/LC_MESSAGES/django.mo
	apps/metadata/locale/it/LC_MESSAGES/django.po
	apps/metadata/locale/nl_NL/LC_MESSAGES/django.mo
	apps/metadata/locale/nl_NL/LC_MESSAGES/django.po
	apps/metadata/locale/pl/LC_MESSAGES/django.mo
	apps/metadata/locale/pl/LC_MESSAGES/django.po
	apps/metadata/locale/pt/LC_MESSAGES/django.mo
	apps/metadata/locale/pt/LC_MESSAGES/django.po
	apps/metadata/locale/pt_BR/LC_MESSAGES/django.mo
	apps/metadata/locale/pt_BR/LC_MESSAGES/django.po
	apps/metadata/locale/ru/LC_MESSAGES/django.mo
	apps/metadata/locale/ru/LC_MESSAGES/django.po
	apps/metadata/migrations/0001_initial.py
	apps/metadata/models.py
	apps/metadata/registry.py
	apps/navigation/locale/bg/LC_MESSAGES/django.mo
	apps/navigation/locale/bg/LC_MESSAGES/django.po
	apps/navigation/locale/de_DE/LC_MESSAGES/django.mo
	apps/navigation/locale/de_DE/LC_MESSAGES/django.po
	apps/navigation/locale/en/LC_MESSAGES/django.mo
	apps/navigation/locale/en/LC_MESSAGES/django.po
	apps/navigation/locale/es/LC_MESSAGES/django.mo
	apps/navigation/locale/es/LC_MESSAGES/django.po
	apps/navigation/locale/fr/LC_MESSAGES/django.mo
	apps/navigation/locale/fr/LC_MESSAGES/django.po
	apps/navigation/locale/it/LC_MESSAGES/django.mo
	apps/navigation/locale/it/LC_MESSAGES/django.po
	apps/navigation/locale/nl_NL/LC_MESSAGES/django.mo
	apps/navigation/locale/nl_NL/LC_MESSAGES/django.po
	apps/navigation/locale/pl/LC_MESSAGES/django.mo
	apps/navigation/locale/pl/LC_MESSAGES/django.po
	apps/navigation/locale/pt/LC_MESSAGES/django.mo
	apps/navigation/locale/pt/LC_MESSAGES/django.po
	apps/navigation/locale/pt_BR/LC_MESSAGES/django.mo
	apps/navigation/locale/pt_BR/LC_MESSAGES/django.po
	apps/navigation/locale/ru/LC_MESSAGES/django.mo
	apps/navigation/locale/ru/LC_MESSAGES/django.po
	apps/navigation/templatetags/navigation_tags.py
	apps/ocr/__init__.py
	apps/ocr/locale/bg/LC_MESSAGES/django.mo
	apps/ocr/locale/bg/LC_MESSAGES/django.po
	apps/ocr/locale/de_DE/LC_MESSAGES/django.mo
	apps/ocr/locale/de_DE/LC_MESSAGES/django.po
	apps/ocr/locale/en/LC_MESSAGES/django.mo
	apps/ocr/locale/en/LC_MESSAGES/django.po
	apps/ocr/locale/es/LC_MESSAGES/django.mo
	apps/ocr/locale/es/LC_MESSAGES/django.po
	apps/ocr/locale/fr/LC_MESSAGES/django.mo
	apps/ocr/locale/fr/LC_MESSAGES/django.po
	apps/ocr/locale/it/LC_MESSAGES/django.mo
	apps/ocr/locale/it/LC_MESSAGES/django.po
	apps/ocr/locale/nl_NL/LC_MESSAGES/django.mo
	apps/ocr/locale/nl_NL/LC_MESSAGES/django.po
	apps/ocr/locale/pl/LC_MESSAGES/django.mo
	apps/ocr/locale/pl/LC_MESSAGES/django.po
	apps/ocr/locale/pt/LC_MESSAGES/django.mo
	apps/ocr/locale/pt/LC_MESSAGES/django.po
	apps/ocr/locale/pt_BR/LC_MESSAGES/django.mo
	apps/ocr/locale/pt_BR/LC_MESSAGES/django.po
	apps/ocr/locale/ru/LC_MESSAGES/django.mo
	apps/ocr/locale/ru/LC_MESSAGES/django.po
	apps/permissions/locale/bg/LC_MESSAGES/django.mo
	apps/permissions/locale/bg/LC_MESSAGES/django.po
	apps/permissions/locale/de_DE/LC_MESSAGES/django.mo
	apps/permissions/locale/de_DE/LC_MESSAGES/django.po
	apps/permissions/locale/en/LC_MESSAGES/django.mo
	apps/permissions/locale/en/LC_MESSAGES/django.po
	apps/permissions/locale/es/LC_MESSAGES/django.mo
	apps/permissions/locale/es/LC_MESSAGES/django.po
	apps/permissions/locale/fr/LC_MESSAGES/django.mo
	apps/permissions/locale/fr/LC_MESSAGES/django.po
	apps/permissions/locale/it/LC_MESSAGES/django.mo
	apps/permissions/locale/it/LC_MESSAGES/django.po
	apps/permissions/locale/nl_NL/LC_MESSAGES/django.mo
	apps/permissions/locale/nl_NL/LC_MESSAGES/django.po
	apps/permissions/locale/pl/LC_MESSAGES/django.mo
	apps/permissions/locale/pl/LC_MESSAGES/django.po
	apps/permissions/locale/pt/LC_MESSAGES/django.mo
	apps/permissions/locale/pt/LC_MESSAGES/django.po
	apps/permissions/locale/pt_BR/LC_MESSAGES/django.mo
	apps/permissions/locale/pt_BR/LC_MESSAGES/django.po
	apps/permissions/locale/ru/LC_MESSAGES/django.mo
	apps/permissions/locale/ru/LC_MESSAGES/django.po
	apps/permissions/models.py
	apps/permissions/registry.py
	apps/project_setup/locale/bg/LC_MESSAGES/django.mo
	apps/project_setup/locale/bg/LC_MESSAGES/django.po
	apps/project_setup/locale/de_DE/LC_MESSAGES/django.mo
	apps/project_setup/locale/de_DE/LC_MESSAGES/django.po
	apps/project_setup/locale/en/LC_MESSAGES/django.mo
	apps/project_setup/locale/en/LC_MESSAGES/django.po
	apps/project_setup/locale/es/LC_MESSAGES/django.mo
	apps/project_setup/locale/es/LC_MESSAGES/django.po
	apps/project_setup/locale/fr/LC_MESSAGES/django.mo
	apps/project_setup/locale/fr/LC_MESSAGES/django.po
	apps/project_setup/locale/it/LC_MESSAGES/django.mo
	apps/project_setup/locale/it/LC_MESSAGES/django.po
	apps/project_setup/locale/nl_NL/LC_MESSAGES/django.mo
	apps/project_setup/locale/nl_NL/LC_MESSAGES/django.po
	apps/project_setup/locale/pl/LC_MESSAGES/django.mo
	apps/project_setup/locale/pl/LC_MESSAGES/django.po
	apps/project_setup/locale/pt/LC_MESSAGES/django.mo
	apps/project_setup/locale/pt/LC_MESSAGES/django.po
	apps/project_setup/locale/pt_BR/LC_MESSAGES/django.mo
	apps/project_setup/locale/pt_BR/LC_MESSAGES/django.po
	apps/project_setup/locale/ru/LC_MESSAGES/django.mo
	apps/project_setup/locale/ru/LC_MESSAGES/django.po
	apps/project_tools/locale/bg/LC_MESSAGES/django.mo
	apps/project_tools/locale/bg/LC_MESSAGES/django.po
	apps/project_tools/locale/de_DE/LC_MESSAGES/django.mo
	apps/project_tools/locale/de_DE/LC_MESSAGES/django.po
	apps/project_tools/locale/en/LC_MESSAGES/django.mo
	apps/project_tools/locale/en/LC_MESSAGES/django.po
	apps/project_tools/locale/es/LC_MESSAGES/django.mo
	apps/project_tools/locale/es/LC_MESSAGES/django.po
	apps/project_tools/locale/fr/LC_MESSAGES/django.mo
	apps/project_tools/locale/fr/LC_MESSAGES/django.po
	apps/project_tools/locale/it/LC_MESSAGES/django.mo
	apps/project_tools/locale/it/LC_MESSAGES/django.po
	apps/project_tools/locale/nl_NL/LC_MESSAGES/django.mo
	apps/project_tools/locale/nl_NL/LC_MESSAGES/django.po
	apps/project_tools/locale/pl/LC_MESSAGES/django.mo
	apps/project_tools/locale/pl/LC_MESSAGES/django.po
	apps/project_tools/locale/pt/LC_MESSAGES/django.mo
	apps/project_tools/locale/pt/LC_MESSAGES/django.po
	apps/project_tools/locale/pt_BR/LC_MESSAGES/django.mo
	apps/project_tools/locale/pt_BR/LC_MESSAGES/django.po
	apps/project_tools/locale/ru/LC_MESSAGES/django.mo
	apps/project_tools/locale/ru/LC_MESSAGES/django.po
	apps/scheduler/__init__.py
	apps/scheduler/locale/bg/LC_MESSAGES/django.mo
	apps/scheduler/locale/bg/LC_MESSAGES/django.po
	apps/scheduler/locale/de_DE/LC_MESSAGES/django.mo
	apps/scheduler/locale/de_DE/LC_MESSAGES/django.po
	apps/scheduler/locale/en/LC_MESSAGES/django.mo
	apps/scheduler/locale/en/LC_MESSAGES/django.po
	apps/scheduler/locale/es/LC_MESSAGES/django.mo
	apps/scheduler/locale/es/LC_MESSAGES/django.po
	apps/scheduler/locale/fr/LC_MESSAGES/django.mo
	apps/scheduler/locale/fr/LC_MESSAGES/django.po
	apps/scheduler/locale/it/LC_MESSAGES/django.mo
	apps/scheduler/locale/it/LC_MESSAGES/django.po
	apps/scheduler/locale/nl_NL/LC_MESSAGES/django.mo
	apps/scheduler/locale/nl_NL/LC_MESSAGES/django.po
	apps/scheduler/locale/pl/LC_MESSAGES/django.mo
	apps/scheduler/locale/pl/LC_MESSAGES/django.po
	apps/scheduler/locale/pt/LC_MESSAGES/django.mo
	apps/scheduler/locale/pt/LC_MESSAGES/django.po
	apps/scheduler/locale/pt_BR/LC_MESSAGES/django.mo
	apps/scheduler/locale/pt_BR/LC_MESSAGES/django.po
	apps/scheduler/locale/ru/LC_MESSAGES/django.mo
	apps/scheduler/locale/ru/LC_MESSAGES/django.po
	apps/scheduler/runtime.py
	apps/smart_settings/locale/bg/LC_MESSAGES/django.mo
	apps/smart_settings/locale/bg/LC_MESSAGES/django.po
	apps/smart_settings/locale/de_DE/LC_MESSAGES/django.mo
	apps/smart_settings/locale/de_DE/LC_MESSAGES/django.po
	apps/smart_settings/locale/en/LC_MESSAGES/django.mo
	apps/smart_settings/locale/en/LC_MESSAGES/django.po
	apps/smart_settings/locale/es/LC_MESSAGES/django.mo
	apps/smart_settings/locale/es/LC_MESSAGES/django.po
	apps/smart_settings/locale/fr/LC_MESSAGES/django.mo
	apps/smart_settings/locale/fr/LC_MESSAGES/django.po
	apps/smart_settings/locale/it/LC_MESSAGES/django.mo
	apps/smart_settings/locale/it/LC_MESSAGES/django.po
	apps/smart_settings/locale/nl_NL/LC_MESSAGES/django.mo
	apps/smart_settings/locale/nl_NL/LC_MESSAGES/django.po
	apps/smart_settings/locale/pl/LC_MESSAGES/django.mo
	apps/smart_settings/locale/pl/LC_MESSAGES/django.po
	apps/smart_settings/locale/pt/LC_MESSAGES/django.mo
	apps/smart_settings/locale/pt/LC_MESSAGES/django.po
	apps/smart_settings/locale/pt_BR/LC_MESSAGES/django.mo
	apps/smart_settings/locale/pt_BR/LC_MESSAGES/django.po
	apps/smart_settings/locale/ru/LC_MESSAGES/django.mo
	apps/smart_settings/locale/ru/LC_MESSAGES/django.po
	apps/sources/locale/bg/LC_MESSAGES/django.mo
	apps/sources/locale/bg/LC_MESSAGES/django.po
	apps/sources/locale/de_DE/LC_MESSAGES/django.mo
	apps/sources/locale/de_DE/LC_MESSAGES/django.po
	apps/sources/locale/en/LC_MESSAGES/django.mo
	apps/sources/locale/en/LC_MESSAGES/django.po
	apps/sources/locale/es/LC_MESSAGES/django.mo
	apps/sources/locale/es/LC_MESSAGES/django.po
	apps/sources/locale/fr/LC_MESSAGES/django.mo
	apps/sources/locale/fr/LC_MESSAGES/django.po
	apps/sources/locale/it/LC_MESSAGES/django.mo
	apps/sources/locale/it/LC_MESSAGES/django.po
	apps/sources/locale/nl_NL/LC_MESSAGES/django.mo
	apps/sources/locale/nl_NL/LC_MESSAGES/django.po
	apps/sources/locale/pl/LC_MESSAGES/django.mo
	apps/sources/locale/pl/LC_MESSAGES/django.po
	apps/sources/locale/pt/LC_MESSAGES/django.mo
	apps/sources/locale/pt/LC_MESSAGES/django.po
	apps/sources/locale/pt_BR/LC_MESSAGES/django.mo
	apps/sources/locale/pt_BR/LC_MESSAGES/django.po
	apps/sources/locale/ru/LC_MESSAGES/django.mo
	apps/sources/locale/ru/LC_MESSAGES/django.po
	apps/sources/registry.py
	apps/tags/__init__.py
	apps/tags/links.py
	apps/tags/locale/bg/LC_MESSAGES/django.mo
	apps/tags/locale/bg/LC_MESSAGES/django.po
	apps/tags/locale/de_DE/LC_MESSAGES/django.mo
	apps/tags/locale/de_DE/LC_MESSAGES/django.po
	apps/tags/locale/en/LC_MESSAGES/django.mo
	apps/tags/locale/en/LC_MESSAGES/django.po
	apps/tags/locale/es/LC_MESSAGES/django.mo
	apps/tags/locale/es/LC_MESSAGES/django.po
	apps/tags/locale/fr/LC_MESSAGES/django.mo
	apps/tags/locale/fr/LC_MESSAGES/django.po
	apps/tags/locale/it/LC_MESSAGES/django.mo
	apps/tags/locale/it/LC_MESSAGES/django.po
	apps/tags/locale/nl_NL/LC_MESSAGES/django.mo
	apps/tags/locale/nl_NL/LC_MESSAGES/django.po
	apps/tags/locale/pl/LC_MESSAGES/django.mo
	apps/tags/locale/pl/LC_MESSAGES/django.po
	apps/tags/locale/pt/LC_MESSAGES/django.mo
	apps/tags/locale/pt/LC_MESSAGES/django.po
	apps/tags/locale/pt_BR/LC_MESSAGES/django.mo
	apps/tags/locale/pt_BR/LC_MESSAGES/django.po
	apps/tags/locale/ru/LC_MESSAGES/django.mo
	apps/tags/locale/ru/LC_MESSAGES/django.po
	apps/tags/registry.py
	apps/tags/views.py
	apps/user_management/__init__.py
	apps/user_management/locale/bg/LC_MESSAGES/django.mo
	apps/user_management/locale/bg/LC_MESSAGES/django.po
	apps/user_management/locale/de_DE/LC_MESSAGES/django.mo
	apps/user_management/locale/de_DE/LC_MESSAGES/django.po
	apps/user_management/locale/en/LC_MESSAGES/django.mo
	apps/user_management/locale/en/LC_MESSAGES/django.po
	apps/user_management/locale/es/LC_MESSAGES/django.mo
	apps/user_management/locale/es/LC_MESSAGES/django.po
	apps/user_management/locale/fr/LC_MESSAGES/django.mo
	apps/user_management/locale/fr/LC_MESSAGES/django.po
	apps/user_management/locale/it/LC_MESSAGES/django.mo
	apps/user_management/locale/it/LC_MESSAGES/django.po
	apps/user_management/locale/nl_NL/LC_MESSAGES/django.mo
	apps/user_management/locale/nl_NL/LC_MESSAGES/django.po
	apps/user_management/locale/pl/LC_MESSAGES/django.mo
	apps/user_management/locale/pl/LC_MESSAGES/django.po
	apps/user_management/locale/pt/LC_MESSAGES/django.mo
	apps/user_management/locale/pt/LC_MESSAGES/django.po
	apps/user_management/locale/pt_BR/LC_MESSAGES/django.mo
	apps/user_management/locale/pt_BR/LC_MESSAGES/django.po
	apps/user_management/locale/ru/LC_MESSAGES/django.mo
	apps/user_management/locale/ru/LC_MESSAGES/django.po
	apps/user_management/registry.py
	apps/web_theme/locale/bg/LC_MESSAGES/django.mo
	apps/web_theme/locale/bg/LC_MESSAGES/django.po
	apps/web_theme/locale/de_DE/LC_MESSAGES/django.mo
	apps/web_theme/locale/de_DE/LC_MESSAGES/django.po
	apps/web_theme/locale/en/LC_MESSAGES/django.mo
	apps/web_theme/locale/en/LC_MESSAGES/django.po
	apps/web_theme/locale/es/LC_MESSAGES/django.mo
	apps/web_theme/locale/es/LC_MESSAGES/django.po
	apps/web_theme/locale/fr/LC_MESSAGES/django.mo
	apps/web_theme/locale/fr/LC_MESSAGES/django.po
	apps/web_theme/locale/it/LC_MESSAGES/django.mo
	apps/web_theme/locale/it/LC_MESSAGES/django.po
	apps/web_theme/locale/nl_NL/LC_MESSAGES/django.mo
	apps/web_theme/locale/nl_NL/LC_MESSAGES/django.po
	apps/web_theme/locale/pl/LC_MESSAGES/django.mo
	apps/web_theme/locale/pl/LC_MESSAGES/django.po
	apps/web_theme/locale/pt/LC_MESSAGES/django.mo
	apps/web_theme/locale/pt/LC_MESSAGES/django.po
	apps/web_theme/locale/pt_BR/LC_MESSAGES/django.mo
	apps/web_theme/locale/pt_BR/LC_MESSAGES/django.po
	apps/web_theme/locale/ru/LC_MESSAGES/django.mo
	apps/web_theme/locale/ru/LC_MESSAGES/django.po
	docs/credits/contributors.rst
	docs/faq/index.rst
	docs/intro/requirements.rst
	docs/releases/index.rst
	docs/topics/document_visualization.rst
	docs/topics/ocr.rst
	fabfile/platforms/linux.py
	misc/process_messages.py
	requirements/development.txt
	requirements/production.txt
	settings.py
	urls.py
2012-12-14 04:25:10 -04:00

365 lines
14 KiB
Python

from __future__ import absolute_import
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.utils.html import conditional_escape
from django.utils.encoding import force_unicode
from common.forms import DetailForm
from common.literals import PAGE_SIZE_CHOICES, PAGE_ORIENTATION_CHOICES
from common.settings import DEFAULT_PAPER_SIZE, DEFAULT_PAGE_ORIENTATION
from common.widgets import TextAreaDiv
from .models import (Document, DocumentType,
DocumentPage, DocumentPageTransformation, DocumentTypeFilename,
DocumentVersion)
from .widgets import document_html_widget
from .literals import (RELEASE_LEVEL_FINAL, RELEASE_LEVEL_CHOICES, DEFAULT_ZIP_FILENAME)
# Document page forms
class DocumentPageTransformationForm(forms.ModelForm):
class Meta:
model = DocumentPageTransformation
def __init__(self, *args, **kwargs):
super(DocumentPageTransformationForm, self).__init__(*args, **kwargs)
self.fields['document_page'].widget = forms.HiddenInput()
class DocumentPageImageWidget(forms.widgets.Widget):
def render(self, name, value, attrs=None):
final_attrs = self.build_attrs(attrs)
zoom = final_attrs.get('zoom', 100)
rotation = final_attrs.get('rotation', 0)
if value:
output = []
output.append('<div class="full-height scrollable" style="overflow: auto;">')
output.append(document_html_widget(value.document, view='document_display', page=value.page_number, zoom=zoom, rotation=rotation))
output.append('</div>')
return mark_safe(u''.join(output))
else:
return u''
class DocumentPageForm(DetailForm):
class Meta:
model = DocumentPage
exclude = ('document', 'document_type', 'page_label', 'content')
def __init__(self, *args, **kwargs):
zoom = kwargs.pop('zoom', 100)
rotation = kwargs.pop('rotation', 0)
super(DocumentPageForm, self).__init__(*args, **kwargs)
self.fields['page_image'].initial = self.instance
self.fields['page_image'].widget.attrs.update({
'zoom': zoom,
'rotation': rotation
})
page_image = forms.CharField(
label=_(u'Page image'), widget=DocumentPageImageWidget()
)
class DocumentPageForm_text(DetailForm):
class Meta:
model = DocumentPage
fields = ('page_label', 'content')
content = forms.CharField(
label=_(u'Contents'),
widget=forms.widgets.Textarea(attrs={
'rows': 18, 'cols': 80, 'readonly': 'readonly'
}))
class DocumentPageForm_edit(forms.ModelForm):
class Meta:
model = DocumentPage
fields = ('page_label', 'content')
def __init__(self, *args, **kwargs):
super(DocumentPageForm_edit, self).__init__(*args, **kwargs)
self.fields['page_image'].initial = self.instance
self.fields.keyOrder = [
'page_image',
'page_label',
'content',
]
self.fields['content'].widget.attrs.update({'class': 'text_area_div'})
page_image = forms.CharField(
required=False, widget=DocumentPageImageWidget()
)
# Document forms
class DocumentPagesCarouselWidget(forms.widgets.Widget):
"""
Display many small representations of document pages
"""
def render(self, name, value, attrs=None):
output = []
output.append(u'<div style="white-space:nowrap; overflow: auto;">')
for page in value.pages.all():
output.append(u'<div style="display: inline-block; margin: 5px 10px 10px 10px;">')
output.append(u'<div class="tc">%(page_string)s %(page)s</div>' % {'page_string': ugettext(u'Page'), 'page': page.page_number})
output.append(
document_html_widget(
page.document,
view='document_preview_multipage',
click_view='document_display',
page=page.page_number,
gallery_name='document_pages',
fancybox_class='fancybox-noscaling',
title=ugettext(u'Page %(page_num)d of %(total_pages)d') % {'page_num': page.page_number, 'total_pages': len(value.pages.all())}
)
)
output.append(u'<div class="tc">')
output.append(u'<a class="fancybox-iframe" href="%s"><span class="famfam active famfam-page_white_go"></span>%s</a>' % (reverse('document_page_view', args=[page.pk]), ugettext(u'Details')))
output.append(u'</div>')
output.append(u'</div>')
output.append(u'</div>')
output.append(u'<br /><span class="famfam active famfam-magnifier"></span>%s' % ugettext(u'Click on the image for full size preview'))
return mark_safe(u''.join(output))
class DocumentPreviewForm(forms.Form):
def __init__(self, *args, **kwargs):
document = kwargs.pop('document', None)
super(DocumentPreviewForm, self).__init__(*args, **kwargs)
self.fields['preview'].initial = document
self.fields['preview'].label = _(u'Document pages (%s)') % document.pages.count()
preview = forms.CharField(widget=DocumentPagesCarouselWidget())
class DocumentForm(forms.ModelForm):
"""
Baseform for document creation, and editing, made generic enough to
be used by document creation from staging files
"""
class Meta:
model = Document
#exclude = ('description', 'tags', 'document_type')
exclude = ('tags', 'document_type')
def __init__(self, *args, **kwargs):
document_type = kwargs.pop('document_type', None)
instance = kwargs.pop('instance', None)
super(DocumentForm, self).__init__(*args, **kwargs)
if 'document_type' in self.fields:
# To allow merging with DocumentForm_edit
self.fields['document_type'].widget = forms.HiddenInput()
if instance:
self.fields['description'].initial = instance.description
self.fields['use_file_name'] = forms.BooleanField(
label=_(u'Use the new version filename as the document filename'),
initial=False,
required=False,
)
# Instance's document_type overrides the passed document_type
if hasattr(instance, 'document_type'):
document_type = instance.document_type
if document_type:
filenames_qs = document_type.documenttypefilename_set.filter(enabled=True)
if filenames_qs.count() > 0:
self.fields['document_type_available_filenames'] = forms.ModelChoiceField(
queryset=filenames_qs,
required=False,
label=_(u'Quick document rename'))
if instance:
self.add_version_fields(instance)
def add_version_fields(self, document):
self.fields['version_update'] = forms.ChoiceField(
label=_(u'Version update'),
choices=DocumentVersion.get_version_update_choices(document.latest_version)
)
self.fields['release_level'] = forms.ChoiceField(
label=_(u'Release level'),
choices=RELEASE_LEVEL_CHOICES,
initial=RELEASE_LEVEL_FINAL,
)
self.fields['serial'] = forms.IntegerField(
label=_(u'Release level serial'),
initial=0,
widget=forms.widgets.TextInput(
attrs={'style': 'width: auto;'}
),
)
self.fields['comment'] = forms.CharField(
label=_(u'Comment'),
required=False,
widget=forms.widgets.Textarea(attrs={'rows': 4}),
)
new_filename = forms.CharField(
label=_('New document filename'), required=False
)
def clean(self):
cleaned_data = self.cleaned_data
cleaned_data['new_version_data'] = {
'comment': self.cleaned_data.get('comment'),
'version_update': self.cleaned_data.get('version_update'),
'release_level': self.cleaned_data.get('release_level'),
'serial': self.cleaned_data.get('serial'),
}
# Always return the full collection of cleaned data.
return cleaned_data
class DocumentForm_edit(DocumentForm):
"""
Form sub classes from DocumentForm used only when editing a document
"""
class Meta:
model = Document
exclude = ('file', 'document_type', 'tags')
def __init__(self, *args, **kwargs):
super(DocumentForm_edit, self).__init__(*args, **kwargs)
self.fields.pop('serial')
self.fields.pop('release_level')
self.fields.pop('version_update')
self.fields.pop('comment')
self.fields.pop('use_file_name')
class DocumentPropertiesForm(DetailForm):
"""
Detail class form to display a document file based properties
"""
class Meta:
model = Document
exclude = ('file', 'tags')
class DocumentContentForm(forms.Form):
"""
Form that concatenates all of a document pages' text content into a
single textarea widget
"""
def __init__(self, *args, **kwargs):
self.document = kwargs.pop('document', None)
super(DocumentContentForm, self).__init__(*args, **kwargs)
#self.fields['contents'].initial = self.document.get_content(add_page_number=True)
#TODO: merge/move with models.py get_content or to widgets.py
content = []
self.fields['contents'].initial = u''
for page in self.document.pages.all():
if page.content:
content.append(conditional_escape(force_unicode(page.content)))
content.append(u'\n\n\n<hr/><div style="text-align: center;">- %s %s -</div><hr/>\n\n\n' % (ugettext(u'Page'), page.page_number))
self.fields['contents'].initial = mark_safe(u''.join(content))
contents = forms.CharField(
label=_(u'Contents'),
widget=TextAreaDiv()
)
class DocumentTypeSelectForm(forms.Form):
"""
Form to select the document type of a document to be created, used
as form #1 in the document creation wizard
"""
document_type = forms.ModelChoiceField(queryset=DocumentType.objects.all(), label=(u'Document type'), required=False)
class PrintForm(forms.Form):
#page_size = forms.ChoiceField(choices=PAGE_SIZE_CHOICES, initial=DEFAULT_PAPER_SIZE, label=_(u'Page size'), required=False)
#custom_page_width = forms.CharField(label=_(u'Custom page width'), required=False)
#custom_page_height = forms.CharField(label=_(u'Custom page height'), required=False)
#page_orientation = forms.ChoiceField(choices=PAGE_ORIENTATION_CHOICES, initial=DEFAULT_PAGE_ORIENTATION, label=_(u'Page orientation'), required=True)
page_range = forms.CharField(label=_(u'Page range'), required=False)
class DocumentTypeForm(forms.ModelForm):
"""
Model class form to create or edit a document type
"""
class Meta:
model = DocumentType
class DocumentTypeFilenameForm(forms.ModelForm):
"""
Model class form to edit a document type filename
"""
class Meta:
model = DocumentTypeFilename
fields = ('filename', 'enabled')
class DocumentTypeFilenameForm_create(forms.ModelForm):
"""
Model class form to create a new document type filename
"""
class Meta:
model = DocumentTypeFilename
fields = ('filename',)
class DocumentDownloadForm(forms.Form):
compressed = forms.BooleanField(label=_(u'Compress'), required=False, help_text=_(u'Download the document in the original format or in a compressed manner. This option is selectable only when downloading one document, for multiple documents, the bundle will always be downloads as a compressed file.'))
zip_filename = forms.CharField(initial=DEFAULT_ZIP_FILENAME, label=_(u'Compressed filename'), required=False, help_text=_(u'The filename of the compressed file that will contain the documents to be downloaded, if the previous option is selected.'))
def __init__(self, *args, **kwargs):
self.document_versions = kwargs.pop('document_versions', None)
super(DocumentDownloadForm, self).__init__(*args, **kwargs)
if len(self.document_versions) > 1:
self.fields['compressed'].initial = True
self.fields['compressed'].widget.attrs.update({'disabled': True})
class DocumentVersionCompareForm(forms.Form):
left_version = forms.ChoiceField(label=_(u'Source version'), required=True)
right_version = forms.ChoiceField(label=_(u'Destination version'), required=True)
def make_choices(self):
return [(version.pk, unicode(version)) for version in self.document.versions.all()]
def __init__(self, *args, **kwargs):
self.document = kwargs.pop('document')
super(DocumentVersionCompareForm, self).__init__(*args, **kwargs)
choices = self.make_choices()
self.fields['left_version'].choices = choices
self.fields['left_version'].initial = choices[-2][0] if len(choices) > 1 else choices[-1][0]
self.fields['right_version'].choices = choices
self.fields['right_version'].initial = choices[-1][0]
class DocumentVersionDiffForm(forms.Form):
def __init__(self, *args, **kwargs):
contents = kwargs.pop('contents', None)
super(DocumentVersionDiffForm, self).__init__(*args, **kwargs)
self.fields['contents'].initial = contents
contents = forms.CharField(
label=_(u'Differences'),
widget=TextAreaDiv()
)