Commits

mitar committed c48cb07

Made markup selection combobox preselect the default if only one markup type is available.

Comments (0)

Files changed (1)

cmsplugin_markup/models.py

     markup = models.CharField(
             _('Markup'),
             max_length=20,
-            choices=MARKUP_CHOICES
+            choices=MARKUP_CHOICES,
+            default=MARKUP_CHOICES[0][0] if len(MARKUP_CHOICES) == 1 else models.NOT_PROVIDED,
             )
 
     def __unicode__(self):