new plugins section
This commit is contained in:
		
					parent
					
						
							
								b3742ed3f7
							
						
					
				
			
			
				commit
				
					
						bbfb37dd8f
					
				
			
		
					 8 changed files with 118 additions and 50 deletions
				
			
		| 
						 | 
				
			
			@ -200,3 +200,38 @@ class DCLSectionImagePluginModel(CMSPlugin):
 | 
			
		|||
        max_length=100, null=True, blank=True,
 | 
			
		||||
        help_text='Optional caption for the image.'
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DCLSectionPromoPluginModel(CMSPlugin):
 | 
			
		||||
    background_image = FilerImageField(
 | 
			
		||||
        on_delete=models.CASCADE, null=True, blank=True,
 | 
			
		||||
        help_text=('Optional background image for the Promo Section'),
 | 
			
		||||
        related_name="dcl_section_promo_promo",
 | 
			
		||||
    )
 | 
			
		||||
    heading = models.CharField(
 | 
			
		||||
        blank=True, null=True, max_length=100,
 | 
			
		||||
        help_text='An optional heading for the Promo Section',
 | 
			
		||||
    )
 | 
			
		||||
    subheading = models.CharField(
 | 
			
		||||
        blank=True, null=True, max_length=200,
 | 
			
		||||
        help_text='An optional subheading for the Promo Section',
 | 
			
		||||
    )
 | 
			
		||||
    content = HTMLField()
 | 
			
		||||
    html_id = models.SlugField(
 | 
			
		||||
        blank=True, null=True,
 | 
			
		||||
        help_text=(
 | 
			
		||||
            'An optional html id for the Section. Required to set as target '
 | 
			
		||||
            'of a link on page'
 | 
			
		||||
        )
 | 
			
		||||
    )
 | 
			
		||||
    plain_heading = models.BooleanField(
 | 
			
		||||
        default=False,
 | 
			
		||||
        help_text='Select to keep the heading style simpler.'
 | 
			
		||||
    )
 | 
			
		||||
    center_on_mobile = models.BooleanField(
 | 
			
		||||
        default=False,
 | 
			
		||||
        help_text='Select to center align content on small screens.'
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    def __str__(self):
 | 
			
		||||
        return '#' + self.html_id if self.html_id else str(self.pk)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue