コード例 #1
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),
         ModelProperty.get_help_text_for(model=Document,
                                         show_name=True).replace(
                                             '\n', '<br>')
     ])
コード例 #2
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([
         force_text(self.fields['expression'].help_text), '<br>',
         ModelProperty.get_help_text_for(model=Document,
                                         show_name=True).replace(
                                             '\n', '<br>')
     ])
コード例 #3
0
 def __init__(self, *args, **kwargs):
     super(SmartLinkConditionForm, self).__init__(*args, **kwargs)
     self.fields['foreign_document_data'] = forms.ChoiceField(
         choices=ModelField.get_choices_for(model=Document, ),
         label=_('Foreign document field'))
     self.fields['expression'].help_text = ' '.join([
         force_text(self.fields['expression'].help_text),
         ModelProperty.get_help_text_for(model=Document,
                                         show_name=True).replace(
                                             '\n', '<br>')
     ])