Пример #1
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkForm, self).__init__(*args, **kwargs)
     self.fields['dynamic_title'].help_text = ' '.join([
         self.fields['dynamic_title'].help_text,
         ModelAttribute.help_text_for(
             Document, type_names=['field', 'related', 'property'])
     ])
Пример #2
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkForm, self).__init__(*args, **kwargs)
     self.fields['dynamic_label'].help_text = ' '.join([
         force_text(self.fields['dynamic_label'].help_text),
         ModelAttribute.help_text_for(
             Document, type_names=['field', 'related',
                                   'property']).replace('\n', '<br>')
     ])
Пример #3
0
 def __init__(self, *args, **kwargs):
     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'])
     ])
Пример #4
0
 def __init__(self, *args, **kwargs):
     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'])
         ]
     )
Пример #5
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkForm, self).__init__(*args, **kwargs)
     self.fields['dynamic_label'].help_text = ' '.join(
         [
             force_text(self.fields['dynamic_label'].help_text),
             ModelAttribute.help_text_for(
                 Document, type_names=['field', 'related', 'property']
             ).replace('\n', '<br>')
         ]
     )
Пример #6
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkConditionForm, self).__init__(*args, **kwargs)
     self.fields['foreign_document_data'] = forms.ChoiceField(
         choices=ModelAttribute.get_choices_for(
             Document, type_names=['field', 'query']),
         label=_('Foreign document attribute'))
     self.fields['expression'].help_text = ' '.join([
         self.fields['expression'].help_text,
         ModelAttribute.help_text_for(
             Document, type_names=['field', 'related', 'property'])
     ])
Пример #7
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkConditionForm, self).__init__(*args, **kwargs)
     self.fields['foreign_document_data'] = forms.ChoiceField(
         choices=ModelAttribute.get_choices_for(
             Document, type_names=['field', 'query']
         ), label=_('Foreign document attribute')
     )
     self.fields['expression'].help_text = ' '.join(
         [
             force_text(self.fields['expression'].help_text),
             ModelAttribute.help_text_for(
                 Document, type_names=['field', 'related', 'property']
             ).replace('\n', '<br>')
         ]
     )
Пример #8
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkForm, self).__init__(*args, **kwargs)
     self.fields['dynamic_title'].help_text = ' '.join([self.fields['dynamic_title'].help_text, ModelAttribute.help_text_for(Document, type_names=['field', 'related', 'property'])])