From 924dfc0a4c49b11723fb4976f01cf92a3e8cc4a2 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 11 Nov 2014 03:01:49 -0400 Subject: [PATCH] Show the available document attributes during document indexing setup form --- mayan/apps/document_indexing/forms.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mayan/apps/document_indexing/forms.py b/mayan/apps/document_indexing/forms.py index 90b0e6b158..4f4977f911 100644 --- a/mayan/apps/document_indexing/forms.py +++ b/mayan/apps/document_indexing/forms.py @@ -2,6 +2,9 @@ from __future__ import absolute_import from django import forms +from common.classes import ModelAttribute +from documents.models import Document + from .models import Index, IndexTemplateNode @@ -22,6 +25,7 @@ class IndexTemplateNodeForm(forms.ModelForm): super(IndexTemplateNodeForm, self).__init__(*args, **kwargs) self.fields['index'].widget = forms.widgets.HiddenInput() self.fields['parent'].widget = forms.widgets.HiddenInput() + self.fields['expression'].help_text = ' '.join([unicode(self.fields['expression'].help_text), ModelAttribute.help_text_for(Document, type_names=['indexing'])]) class Meta: model = IndexTemplateNode