src/cm/views/texts.py
changeset 234 b33dd64a57f0
parent 232 a6c6b046a9c0
child 235 b23aee4dd81d
equal deleted inserted replaced
233:528f4267bcfa 234:b33dd64a57f0
   613     class Meta:
   613     class Meta:
   614         model = TextVersion
   614         model = TextVersion
   615         fields = ('title', 'content', 'format')
   615         fields = ('title', 'content', 'format')
   616 
   616 
   617 class EditTextForm(ModelForm):
   617 class EditTextForm(ModelForm):
   618     title = forms.CharField(label=_("Title"), widget=forms.TextInput)
   618     title = forms.CharField(label=ugettext_lazy("Title"), widget=forms.TextInput)
   619     #format = forms.CharField(label=_("Format"))
   619     #format = forms.CharField(label=_("Format"))
   620     #content = forms.TextField(label=_("Content"))
   620     #content = forms.TextField(label=_("Content"))
   621 
   621 
   622     note = forms.CharField(label=_("Note (optional)"),
   622     note = forms.CharField(label=ugettext_lazy("Note (optional)"),
   623                            widget=forms.TextInput,
   623                            widget=forms.TextInput,
   624                            required=False,
   624                            required=False,
   625                            help_text=_("Add a note to explain the modifications made to the text")
   625                            help_text=ugettext_lazy("Add a note to explain the modifications made to the text")
   626                            )
   626                            )
   627 
   627 
   628     #tags = forms.CharField(label=_("Tags (optional)"),
   628     #tags = forms.CharField(label=_("Tags (optional)"),
   629     #                       widget=forms.TextInput,
   629     #                       widget=forms.TextInput,
   630     #                       required=False,
   630     #                       required=False,
   631     #                       #help_text=_("Add a note to explain the modifications made to the text")
   631     #                       #help_text=_("Add a note to explain the modifications made to the text")
   632     #                       )
   632     #                       )
   633 
   633 
   634 
   634 
   635     new_version = forms.BooleanField(label=_("New version (optional)"),
   635     new_version = forms.BooleanField(label=ugettext_lazy("New version (optional)"),
   636                            required=False,
   636                            required=False,
   637                            initial=True,
   637                            initial=True,
   638                            help_text=_("Create a new version of this text (recommended)")
   638                            help_text=ugettext_lazy("Create a new version of this text (recommended)")
   639                            )
   639                            )
   640 
   640 
   641     keep_comments = forms.BooleanField(label=_("Keep comments (optional)"),
   641     keep_comments = forms.BooleanField(label=_("Keep comments (optional)"),
   642                            required=False,
   642                            required=False,
   643                            initial=True,
   643                            initial=True,
   644                            help_text=_("Keep comments (if not affected by the edit)")
   644                            help_text=ugettext_lazy("Keep comments (if not affected by the edit)")
   645                            )
   645                            )
   646     
   646     
   647     class Meta:
   647     class Meta:
   648         model = TextVersion
   648         model = TextVersion
   649         fields = ('title', 'format', 'content', 'new_version', 'tags', 'note')
   649         fields = ('title', 'format', 'content', 'new_version', 'tags', 'note')