diff options
Diffstat (limited to 'ishtar_common/forms.py')
| -rw-r--r-- | ishtar_common/forms.py | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 3dfcad09e..4300e9c36 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -640,6 +640,21 @@ class ManageOldType(IshtarForm):          self.fields[field.key].help_text = field.get_help() +class QAForm(CustomForm, ManageOldType): +    MULTI = False + +    def __init__(self, *args, **kwargs): +        self.items = kwargs.pop('items') +        super(QAForm, self).__init__(*args, **kwargs) +        for k in self.fields: +            if self.MULTI and k not in self.REPLACE_FIELDS: +                self.fields[k].label = unicode(self.fields[k].label) + \ +                                       unicode(u" - append to existing") +            else: +                self.fields[k].label = unicode(self.fields[k].label) + \ +                                       unicode(u" - replace") + +  class DocumentGenerationForm(forms.Form):      """      Form to generate document by choosing the template | 
