Beispiel #1
0
class PersonPage(Page):
    info = StreamField([
        ('birthplace', blocks.CharBlock(required=False)),
        ('birth_date', blocks.DateBlock(required=False)),
        ('death_date', blocks.DateBlock(required=False)),
        ('email', blocks.EmailBlock(required=False)),
        ('facebook', blocks.URLBlock(required=False)),
        ('twitter', blocks.URLBlock(required=False)),
        ('linkedin', blocks.URLBlock(required=False)),
        ('website', blocks.URLBlock(required=False)),
    ])
    content = RichTextField(blank=True)
    tags = ClusterTaggableManager(through=PersonPageTag, blank=True)
    image = models.ForeignKey(Image,
                              null=True,
                              blank=True,
                              on_delete=models.SET_NULL,
                              related_name='+')
    feed_image = models.ForeignKey(Image,
                                   null=True,
                                   blank=True,
                                   on_delete=models.SET_NULL,
                                   related_name='+')

    indexed_fields = (
        'info',
        'content',
    )
Beispiel #2
0
class ProjectEngineersBlock(blocks.StructBlock):
    """List and buttons of main"""

    info = blocks.RichTextBlock(icon="text")

    points = blocks.ListBlock(
            blocks.StructBlock(
                    [
                        ("title", blocks.CharBlock(required=True, max_length=200)),
                        ("members", blocks.ListBlock(
                            blocks.StructBlock(
                            [
                                ("name", blocks.RichTextBlock(icon='text')),
                                ("designation", blocks.RichTextBlock(icon='text')),
                                ("email", blocks.EmailBlock()),
                                ("contact_no", blocks.RichTextBlock(icon='number')),
                            ]
                        )
                    )
                )
            ]        
        )
    )

    class Meta:  #noqa
        template = "streams/project_engineers_block.html"
        icon="edit"
        label="Project Engineer and Members"
Beispiel #3
0
class EscuelaVarillajeUbicacionColorBlock(StructBlock):
    nombre = CharBlock(classname="text-white mt-0", required=False)
    clase_css = ChoiceBlock(choices=[
        ('', 'Seleccionar una clase'),
        ('bg-primary', 'bg-primary'),
        ('bg-secondary', 'bg-secondary'),
        ('bg-success', 'bg-success'),
        ('bg-info', 'bg-info'),
        ('bg-warning', 'bg-warning'),
        ('bg-danger', 'bg-danger'),
        ('bg-dark', 'bg-dark'),
    ])
    titulo = CharBlock(classname="text-white mt-0", required=False)
    cuerpo = RichTextBlock(required=False)
    telefono = blocks.CharBlock(max_length=22)
    calle = blocks.CharBlock(max_length=255)
    colonia = blocks.CharBlock(max_length=255)
    ciudad = blocks.CharBlock(max_length=255)
    estado = blocks.CharBlock(max_length=255)
    facebook_url = blocks.URLBlock()
    youtube_url = blocks.URLBlock()
    instagram_url = blocks.URLBlock()
    email = blocks.EmailBlock()

    class Meta:
        template = 'escueladevarillaje/blocks/escuela_varillaje_ubicacion_color_block.html'
        icon = "fa-globe"
Beispiel #4
0
class EmployeeCardBlock(blocks.StructBlock):
    name = blocks.CharBlock(required=True, help_text="Add employee name")
    job_title = blocks.CharBlock(required=False, help_text="Add job title")
    photo = ImageChooserBlock(required=False)
    short_bio = blocks.TextBlock(required=False,
                                 help_text="Add a short bio (OPTIONAL)")
    phone = blocks.CharBlock(required=False, help_text="Add phone number")
    whatsapp = blocks.CharBlock(
        required=False,
        help_text=
        "Add full phone number in international format without any zeroes, brackets, or dashes."
    )
    email = blocks.EmailBlock(required=False,
                              help_text="Add employee email id")
    linkedin = blocks.URLBlock(required=False,
                               help_text="Add URL for LinkedIn account")

    class Meta:
        template = "home/blocks/employee_block.html"
        label = "Team Member"
        icon = "user"

    def save(self, *args, **kwargs):

        key = make_template_fragment_key("about")
        cache.delete(key)

        return super().save(*args, **kwargs)
Beispiel #5
0
class CoworkerBlock(blocks.StructBlock):
    name = blocks.CharBlock(max_length=255, blank=True)
    roepnaam = blocks.CharBlock(max_length=255, null=True, blank=True)
    job_function = blocks.CharBlock(max_length=255, blank=True, null=True)
    address = blocks.CharBlock(
        max_length=255,
        blank=True,
        null=True,
        required=False,
    )
    email = blocks.EmailBlock(
        max_length=254,
        blank=True,
        null=True,
        required=False,
    )
    phone = blocks.CharBlock(
        max_length=255,
        blank=True,
        null=True,
        required=False,
    )
    linkedin = blocks.URLBlock(
        max_length=200,
        blank=True,
        null=True,
        required=False,
    )
    positions = blocks.IntegerBlock(default=1)
    image = ImageChooserBlock()
Beispiel #6
0
class ContactBlock(blocks.StructBlock):
    body = blocks.TextBlock()
    name = blocks.CharBlock()
    email = blocks.EmailBlock()

    class Meta:
        icon = 'user'
Beispiel #7
0
class ContactBlock(blocks.StructBlock):
    heading = blocks.CharBlock(label="Überschrift")
    text = blocks.RichTextBlock(label="Text", required=False)
    image = ImageChooserBlock(label="Bild", required=False)

    telephone = blocks.CharBlock(label="Telefon-Nummer", required=False)
    telephone_hours = blocks.CharBlock(label="Telefon-Nummer Öffnungszeiten",
                                       required=False)

    email = blocks.EmailBlock(label="E-Mail-Adresse", required=False)

    address = blocks.RichTextBlock(label="Adresse", required=False)
    address_google = blocks.URLBlock(label="Adresse bei Google",
                                     required=False)
    address_osm = blocks.URLBlock(label="Adresse bei OpenStreetMaps",
                                  required=False)
    address_directions = blocks.URLBlock(
        label="Adresse: Link zu Wegbeschreibung", required=False)

    link_text = blocks.CharBlock(label="Link-Text", required=False)
    link_url = blocks.URLBlock(label="Link-URL", required=False)

    class Meta:
        label = "Kontakt-Block"
        template = "contact/block.html"
Beispiel #8
0
class HomePage(Page):
    """Customized portfolio homepage with editing capabilities."""

    contact_email = StreamField([('contact_email', blocks.EmailBlock())],
                                blank=True)

    portfolio_information = StreamField([
        ('heading', blocks.CharBlock(default='Portfolio Title')),
        ('paragraph', blocks.TextBlock(default='Portfolio Subheading')),
    ])

    external_portfolio_links = StreamField([('links', ExternalPortfolioLink())
                                            ])
    project_images = StreamField(
        [('project_example',
          blocks.ListBlock(ProjectImageBlock,
                           template='blocks/portfolio_image.html'))],
        blank=True,
    )

    content_panels = Page.content_panels + [
        StreamFieldPanel('portfolio_information'),
        StreamFieldPanel('contact_email'),
        StreamFieldPanel('external_portfolio_links'),
        StreamFieldPanel('project_images'),
    ]

    class Meta:
        verbose_name = 'homepage'
Beispiel #9
0
class ContactEmail(blocks.StructBlock):
    emails = blocks.ListBlock(
        blocks.StructBlock([
            ('url', blocks.EmailBlock(label="Email address")),
            ('text',
             blocks.CharBlock(required=False, label="Link text (optional)")),
        ]))

    def clean(self, value):
        cleaned = super(ContactEmail, self).clean(value)

        if not cleaned.get('emails'):
            raise ValidationError(
                "Validation error in ContactEmail: "
                "at least one email address is required",
                params={
                    'heading':
                    ErrorList(["At least one email address is required."])
                })

        return cleaned

    class Meta:
        icon = 'mail'
        template = '_includes/molecules/contact-email.html'
        label = 'Email'
Beispiel #10
0
class SchemaPersonBlock(blocks.StructBlock):
    name = blocks.CharBlock()
    description = blocks.CharBlock(required=False, default='')
    email = blocks.EmailBlock(required=False, default='')
    image = ImageChooserBlock(required=False)
    url = blocks.PageChooserBlock(required=False)

    class Meta:
        template = 'home/blocks/schemas/person.html'
Beispiel #11
0
class HomePage(Page):
    advert = models.ForeignKey('home.Advert',
                               null=True,
                               blank=True,
                               on_delete=models.SET_NULL,
                               related_name='+')

    body = StreamField([
        ('Paragraph', blocks.RichTextBlock()),
        ('Image', ImageChooserBlock()),
        ('OtherImgBlock', OtherImgBlock()),
        ('Text', blocks.TextBlock()),
        ('Heading', blocks.CharBlock()),
        ('BlockQuote', blocks.BlockQuoteBlock()),
        ('Email', blocks.EmailBlock()),
        ('URL', blocks.URLBlock()),
        ('Boolean', blocks.BooleanBlock()),
        ('Integer', blocks.IntegerBlock()),
        ('Float', blocks.FloatBlock()),
        ('Decimal', blocks.DecimalBlock()),
        ('Date', blocks.DateBlock()),
        ('Time', blocks.TimeBlock()),
        ('DateTime', blocks.DateTimeBlock()),
        ('RawHTML', blocks.RawHTMLBlock()),
        ('Choice', blocks.ChoiceBlock()),
        ('PageChooser', blocks.PageChooserBlock()),
        ('DocumentChooser', DocumentChooserBlock()),
        ('Banner', BannerBlock()),
        ('Embed', EmbedBlock()),
        ('RecommendCourse',
         blocks.StructBlock([('title', blocks.CharBlock()),
                             ('courses', blocks.ListBlock(CourseBlock()))],
                            template='home/blocks/recommend_courses.html')),
        ('SeriesCourse',
         blocks.StructBlock([('title', blocks.CharBlock()),
                             ('series', blocks.ListBlock(SeriesBlock()))],
                            template='home/blocks/series_list.html')),
        ('StoryBlock', StoryBlock()),
        ('ProfessorBlock', ProfessorBlock()),
        ('CategoriesListBlock', CategoriesListBlock()),
        ('SubjectCourse',
         blocks.StructBlock(
             [('required_course', blocks.ListBlock(SeriesBlock())),
              ('optional_course', blocks.ListBlock(SeriesBlock()))],
             template='home/blocks/subject_course.html')),
        ('VipBlock', VipBlock()),
        ('SeriesProcessBlock', SeriesProcessBlock()),
    ])

    content_panels = Page.content_panels + [
        StreamFieldPanel('body'),
        SnippetChooserPanel('advert'),
    ]

    api_fields = [
        APIField('body'),
    ]
Beispiel #12
0
class PersonBlock(blocks.StructBlock):
    class Meta:
        icon = "user"
        label = "Person"
        template = "home/blocks/person.html"

    name = blocks.CharBlock(required=True)
    position = blocks.CharBlock(required=True)
    email = blocks.EmailBlock(required=False)
    bio = blocks.RichTextBlock(required=True, features=["bold", "italic"])
Beispiel #13
0
class _S_SmallBlock(blocks.StructBlock):
    charblock = blocks.CharBlock()
    textblock = blocks.TextBlock()
    emailblock = blocks.EmailBlock()

    graphql_fields = [
        GraphQLString("charblock"),
        GraphQLString("textblock"),
        GraphQLString("emailblock"),
    ]
Beispiel #14
0
class CommonMailToLink(blocks.StructBlock):
    """
    Single Mailto Tile Block
    """
    mailto = blocks.EmailBlock(required=True)
    title = blocks.CharBlock(required=True)

    class Meta:
        template = 'commonblocks/mailto_link.html'
        icon = 'site'
Beispiel #15
0
class BulletinItemBlock(blocks.StructBlock):
    title = blocks.CharBlock()
    date = blocks.DateBlock(required=False)
    contact_name = blocks.CharBlock(required=False)
    contact_email = blocks.EmailBlock(required=False)
    contact_phone = blocks.CharBlock(max_length=20, required=False)
    body = blocks.RichTextBlock(blank=True)

    class Meta:
        template = "blocks/bulletin_item.html"
class BodyBlock(blocks.StreamBlock):

    heading = blocks.CharBlock()
    description = blocks.TextBlock()
    email = blocks.EmailBlock()
    number = blocks.IntegerBlock()
    numbers = blocks.ListBlock(blocks.IntegerBlock())
    paragraph = blocks.RichTextBlock()
    image = ImageChooserBlock()
    author = AuthorBlock()
    authors = blocks.ListBlock(AuthorBlock())
Beispiel #17
0
class AboutPage(Page):
    title_fi = models.CharField(_('Title (Finnish)'),
                                max_length=200,
                                blank=True,
                                null=True)
    photo = models.ForeignKey(
        'wagtailimages.Image',
        blank=True,
        null=True,
        on_delete=models.SET_NULL,
        related_name='+',
        verbose_name='Background photo',
    )
    header = RichTextField(_('Header (English)'), max_length=500)
    header_fi = RichTextField(_('Header (Finnish)'),
                              max_length=500,
                              blank=True,
                              null=True)
    text = RichTextField(_('Text (English)'))
    text_fi = RichTextField(_('Text (Finnish)'), blank=True, null=True)
    team_members = StreamField([
        ('team_member',
         blocks.StructBlock([
             ('name', blocks.CharBlock()),
             ('title', blocks.CharBlock(label=_('Title (English)'))),
             ('title_fi',
              blocks.CharBlock(label=_('Title (Finnish)'), required=False)),
             ('photo', ImageChooserBlock()),
             ('bio', blocks.RichTextBlock(label=_('Bio (English)'))),
             ('bio_fi',
              blocks.RichTextBlock(label=_('Bio (Finnish)'), required=False)),
             ('email', blocks.EmailBlock(required=False)),
             ('phone', blocks.CharBlock(required=False)),
         ])),
    ],
                               blank=True)
    footer = RichTextField(_('Footer (English)'), blank=True, null=True)
    footer_fi = RichTextField(_('Footer (Finnish)'), blank=True, null=True)

    max_count = 1

    content_panels = Page.content_panels + [
        FieldPanel('title_fi'),
        MultiFieldPanel([
            ImageChooserPanel('photo'),
            FieldPanel('header'),
            FieldPanel('header_fi'),
            FieldPanel('text'),
            FieldPanel('text_fi'),
        ]),
        StreamFieldPanel('team_members'),
        FieldPanel('footer'),
        FieldPanel('footer_fi'),
    ]
Beispiel #18
0
class TestStreamBlock(blocks.StreamBlock):
    test_charblock = blocks.CharBlock(max_length=255)
    test_textblock = blocks.TextBlock()
    test_emailblock = blocks.EmailBlock()
    test_urlblock = blocks.URLBlock()
    test_richtextblock = blocks.RichTextBlock()
    test_rawhtmlblock = blocks.RawHTMLBlock()
    test_blockquoteblock = blocks.BlockQuoteBlock()
    test_structblock = TestStructBlock()
    test_listblock = blocks.ListBlock(blocks.TextBlock())
    test_nestedstreamblock = TestNestedStreamBlock()
    test_customstructblock = CustomStructBlock()
Beispiel #19
0
class PersonnelBlock(blocks.StructBlock):
    image = ImageChooserBlock(required=False)
    hover_image = ImageChooserBlock(required=False)
    name = blocks.TextBlock()
    position = blocks.TextBlock(required=False)
    email = blocks.EmailBlock(required=False)
    phone = blocks.TextBlock(required=False)
    office = blocks.TextBlock(required=False)

    class Meta:
        icon = 'user'
        template = 'contacts/blocks/person.html'
Beispiel #20
0
class TestStreamBlock(blocks.StreamBlock):
    test_charblock = blocks.CharBlock(max_length=255)
    test_textblock = blocks.TextBlock(label=__("text block"))
    test_emailblock = blocks.EmailBlock()
    test_urlblock = blocks.URLBlock()
    test_richtextblock = blocks.RichTextBlock()
    test_rawhtmlblock = blocks.RawHTMLBlock()
    test_blockquoteblock = blocks.BlockQuoteBlock()
    test_structblock = TestStructBlock()
    test_listblock = blocks.ListBlock(blocks.TextBlock())
    test_nestedstreamblock = TestNestedStreamBlock()
    test_customstructblock = CustomStructBlock()
    test_customblockwithoutextractmethod = CustomBlockWithoutExtractMethod()
Beispiel #21
0
class InlinedItemsBlock(blocks.StreamBlock):
    text = RichTextBlock(icon='edit')
    image = ImageChooserBlock(icon='image')
    blockquote = blocks.BlockQuoteBlock(icon='openquote')
    document = DocumentChooserBlock(icon='doc-full')
    email = blocks.EmailBlock(icon='mail')
    link = QuickLinkBlock(icon='link', template='blog/blocks/quick_link_block.html')

    class Meta:
        template = 'blog/blocks/inlined_items_block.html'
        icon = 'arrow-right'
        label = 'Block-Inline Items'
        help_text = 'A row of flex items justified to full page width with equal spacing between, only wrapping to new row when necessary.'
Beispiel #22
0
class BodyBlock(blocks.StreamBlock):

    heading = blocks.CharBlock()
    description = blocks.TextBlock()
    email = blocks.EmailBlock()
    number = blocks.IntegerBlock()
    numbers = blocks.ListBlock(blocks.IntegerBlock())
    paragraph = blocks.RichTextBlock()
    image = ImageChooserBlock()
    person = PersonBlock()
    people = blocks.ListBlock(PersonBlock())
    stream = blocks.StreamBlock([("heading", blocks.CharBlock()),
                                 ("paragraph", blocks.RichTextBlock()),
                                 ("image", ImageChooserBlock())])
class TestStreamBlock(blocks.StreamBlock):
    test_charblock = blocks.CharBlock(max_length=255)
    test_textblock = blocks.TextBlock(label=gettext_lazy("text block"))
    test_emailblock = blocks.EmailBlock()
    test_urlblock = blocks.URLBlock()
    test_richtextblock = blocks.RichTextBlock()
    test_rawhtmlblock = blocks.RawHTMLBlock()
    test_blockquoteblock = blocks.BlockQuoteBlock()
    test_structblock = TestStructBlock()
    test_listblock = blocks.ListBlock(blocks.TextBlock())
    test_nestedstreamblock = TestNestedStreamBlock()
    test_customstructblock = CustomStructBlock()
    test_customblockwithoutextractmethod = CustomBlockWithoutExtractMethod()
    test_pagechooserblock = blocks.PageChooserBlock()
    test_imagechooserblock = ImageChooserBlock()
    test_documentchooserblock = DocumentChooserBlock()
    test_snippetchooserblock = SnippetChooserBlock(TestSnippet)
Beispiel #24
0
class ConstructionBlock(blocks.StreamBlock):
    heading = HeadingBlock(required=False, icon='title')
    richtext = blocks.RichTextBlock(icon='pilcrow', label='Rich Text')
    paragraph = blocks.TextBlock(icon='pilcrow',template='blog/blocks/text_block.html', label='Simple Text')
    blockquote = blocks.BlockQuoteBlock(icon='openquote')
    image = ImageChooserBlock(icon='image')
    video = EmbedBlock(icon='media')
    code = CodeBlock(icon='code')
    search = SearchBlock(icon='search')
    author = AuthorBlock(icon='user')
    document = DocumentChooserBlock(icon='doc-full')
    email = blocks.EmailBlock(icon='mail')
    linklist = blocks.ListBlock(
        QuickLinkBlock(), template='blog/blocks/linklist_block.html', icon='link')
    documentlist = blocks.ListBlock(DocumentChooserBlock(icon='doc-full'))

    class Meta:
        template = 'blog/blocks/construction_block.html'
        icon = 'placeholder'
        label = 'Construction Block'
Beispiel #25
0
class EscuelaVarillajeUbicacionLightBlock(StructBlock):
    nombre = CharBlock(classname="text-white mt-0", required=False)
    clase_css = ChoiceBlock(choices=[
        ('bg-white', 'bg-white'),
        ('bg-transparent', 'bg-transparent'),
        ('bg-light', 'bg-light'),
    ])
    titulo = CharBlock(classname="text-white mt-0", required=False)
    cuerpo = RichTextBlock(required=False)
    telefono = blocks.CharBlock(max_length=22)
    calle = blocks.CharBlock(max_length=255)
    colonia = blocks.CharBlock(max_length=255)
    ciudad = blocks.CharBlock(max_length=255)
    estado = blocks.CharBlock(max_length=255)
    facebook_url = blocks.URLBlock()
    youtube_url = blocks.URLBlock()
    instagram_url = blocks.URLBlock()
    email = blocks.EmailBlock()

    class Meta:
        template = 'escueladevarillaje/blocks/escuela_varillaje_ubicacion_light_block.html'
        icon = "fa-globe"
Beispiel #26
0
class TestStreamBlock(blocks.StreamBlock):
    test_charblock = blocks.CharBlock(max_length=255)
    test_textblock = blocks.TextBlock(label=gettext_lazy("text block"))
    test_emailblock = blocks.EmailBlock()
    test_urlblock = blocks.URLBlock()
    test_richtextblock = blocks.RichTextBlock()
    test_rawhtmlblock = blocks.RawHTMLBlock()
    test_blockquoteblock = blocks.BlockQuoteBlock()
    test_structblock = TestStructBlock()
    test_listblock = blocks.ListBlock(blocks.TextBlock())
    test_nestedstreamblock = TestNestedStreamBlock()
    test_customstructblock = CustomStructBlock()
    test_customblockwithoutextractmethod = CustomBlockWithoutExtractMethod()
    test_pagechooserblock = blocks.PageChooserBlock()
    test_pagechooserblock_with_restricted_types = blocks.PageChooserBlock([
        'wagtail_localize_test.TestHomePage', 'wagtail_localize_test.TestPage'
    ])
    test_imagechooserblock = ImageChooserBlock()
    test_documentchooserblock = DocumentChooserBlock()
    test_snippetchooserblock = SnippetChooserBlock(TestSnippet)
    test_nontranslatablesnippetchooserblock = SnippetChooserBlock(
        NonTranslatableSnippet)
    test_embedblock = EmbedBlock()
class AboutBlock(blocks.StructBlock):
    text_id = blocks.CharBlock(label='Identificador de Navegacion ')
    image_profile = ImageChooserBlock(required=True, label='Imagen de Perfil',
                                      help_text='Seleccione una de Perfil para tu seccion "Sobre mi". '
                                                'Se recomienda imagen de 150x150')
    text_name = blocks.CharBlock(label='Ingrese nombre: ')
    text_profile = blocks.CharBlock(label='Ingrese rol de tu perfil: ')
    text_email = blocks.EmailBlock(label='Ingrese tu correo electronico: ')
    text_phone = blocks.CharBlock(label='Ingrese tu numero de telefono: ')
    text_about = blocks.RichTextBlock(label='Ingrese una Descripcion de perfil: ',
                                      help_text='En este apartado se recomienda escribir un '
                                                'texto no mayor a tres parrafos')

    Skill_list = blocks.ListBlock(blocks.StructBlock([
        ('name_technology', blocks.CharBlock(label='Ingrese el nombre de tu habilidad.')),
        ('num_skill',
         blocks.IntegerBlock(required=True, min_value=1, max_value=100, label='Ingrese numero de habilidad:',
                             help_text='En una escala del 1 al 100 puedes ingresar la destresa de tu habilidad.')),
    ]), label='Añadir Habilidades', required=False)

    class Meta:
        template = 'blocks/main/presentation_main_block.html'
        label = 'Seccion Sobre Mi'
Beispiel #28
0
class CustomBlock1(blocks.StructBlock):
    field_char = blocks.CharBlock(required=False)
    field_text = blocks.TextBlock(required=False)
    field_email = blocks.EmailBlock(required=False)
    field_int = blocks.IntegerBlock(required=False)
    field_float = blocks.FloatBlock(required=False)
    field_decimal = blocks.DecimalBlock(required=False)
    field_regex = blocks.RegexBlock(regex=r'^[0-9]{3}$', required=False)
    field_url = blocks.URLBlock(required=False)
    field_bool = blocks.BooleanBlock(required=False)
    field_date = blocks.DateBlock(required=False)
    field_time = blocks.TimeBlock(required=False)
    field_datetime = blocks.DateTimeBlock(required=False)
    field_rich = blocks.RichTextBlock(required=False)
    field_raw = blocks.RawHTMLBlock(required=False)
    field_quote = blocks.BlockQuoteBlock(required=False)
    field_choice = blocks.ChoiceBlock(choices=[('tea', 'Tea'),
                                               ('coffee', 'Coffee')],
                                      icon='cup',
                                      required=False)
    field_static = blocks.StaticBlock(required=False)
    field_list = blocks.ListBlock(blocks.CharBlock, required=False)
    field_list_2 = blocks.ListBlock(CustomBlockInner, required=False)
class ContactBlock(blocks.StructBlock):
    text_id = blocks.CharBlock(label='Identificador de Navegacion ')
    text_title_main = blocks.CharBlock(label='Titulo Principal:', help_text='Ejemplo: Envíenos un mensaje')
    text_title_secondary = blocks.CharBlock(label='Titulo Segundario:', help_text='Ejemplo: Otros canales..')
    text_description = blocks.RichTextBlock(label='Ingrese una Descripcion de contacto: ',
                                      help_text='Se recomienda un texto menor a 40 palabras')
    text_address = blocks.CharBlock(label='Direccion de residencia:', help_text='329 WASHINGTON ST BOSTON, MA 02108')
    number_contact = blocks.CharBlock(label='Telefono de contacto:', help_text='(617) 557-0089')
    email = blocks.EmailBlock(label='Correo de Contacto:', help_text='*****@*****.**')

    social_list = blocks.ListBlock(blocks.StructBlock([
        ('icon', blocks.CharBlock(label='Ícono de redsocial: ', max_length=255, blank=True, null=True,
                                  required=False, help_text=mark_safe('Agregue el texto que referencia un icono.'
                                                                      ' Ejemplo: ion-social-facebook Lista de iconos: '
                                                                      '<a target="_blank" '
                                                                      'href="https://ionicons.com/v2/cheatsheet.html">'
                                                                      'Íconos</a>'))),
        ('url_social', blocks.URLBlock(label='Ingrese url de red social')),
    ]), label='Añadir Red Social', required=False)

    class Meta:
        template = 'blocks/main/contact_main_block.html'
        label = 'Bloque de contacto'
Beispiel #30
0
class Migration(migrations.Migration):

    dependencies = [
        ('v1', '0205_bureau_structure_multiple_leads'),
    ]

    operations = [
        migrations.CreateModel(
            name='EnforcementActionPage',
            fields=[
                ('abstractfilterpage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='v1.AbstractFilterPage')),
                ('sidebar_header', models.CharField(default='Action details', max_length=100)),
                ('court', models.CharField(blank=True, default='', max_length=150)),
                ('institution_type', models.CharField(choices=[('Nonbank', 'Nonbank'), ('Bank', 'Bank')], max_length=50)),
                ('docket_number', models.CharField(max_length=100)),
                ('content', core_fields.StreamField((('full_width_text', core_blocks.StreamBlock((('content', core_blocks.RichTextBlock(icon='edit')), ('content_with_anchor', core_blocks.StructBlock((('content_block', core_blocks.RichTextBlock()), ('anchor_link', core_blocks.StructBlock((('link_id', core_blocks.CharBlock(help_text='\n            ID will be auto-generated on save.\n            However, you may enter some human-friendly text that\n            will be incorporated to make it easier to read.\n        ', label='ID for this content block', required=False)),)))))), ('heading', core_blocks.StructBlock((('text', v1.blocks.HeadingTextBlock(required=False)), ('level', core_blocks.ChoiceBlock(choices=[('h2', 'H2'), ('h3', 'H3'), ('h4', 'H4')])), ('icon', v1.blocks.HeadingIconBlock(help_text='Input the name of an icon to appear to the left of the heading. E.g., approved, help-round, etc. <a href="https://cfpb.github.io/capital-framework/components/cf-icons/#the-icons">See full list of icons</a>', required=False))), required=False)), ('image', core_blocks.StructBlock((('image', core_blocks.StructBlock((('upload', images_blocks.ImageChooserBlock(required=False)), ('alt', core_blocks.CharBlock(help_text="If the image is decorative (i.e., if a screenreader wouldn't have anything useful to say about it), leave the Alt field blank.", required=False))))), ('image_width', core_blocks.ChoiceBlock(choices=[('full', 'full'), (470, '470px'), (270, '270px'), (170, '170px')])), ('image_position', core_blocks.ChoiceBlock(choices=[('right', 'right'), ('left', 'left')], help_text='Does not apply if the image is full-width')), ('text', core_blocks.RichTextBlock(label='Caption', required=False)), ('is_bottom_rule', core_blocks.BooleanBlock(default=True, help_text='Check to add a horizontal rule line to bottom of inset.', label='Has bottom rule line', required=False))))), ('table_block', v1.atomic_elements.organisms.AtomicTableBlock(table_options={'renderer': 'html'})), ('quote', core_blocks.StructBlock((('body', core_blocks.TextBlock()), ('citation', core_blocks.TextBlock(required=False)), ('is_large', core_blocks.BooleanBlock(required=False))))), ('cta', core_blocks.StructBlock((('slug_text', core_blocks.CharBlock(required=False)), ('paragraph_text', core_blocks.RichTextBlock(required=False)), ('button', core_blocks.StructBlock((('text', core_blocks.CharBlock(required=False)), ('url', core_blocks.CharBlock(default='/', required=False)), ('size', core_blocks.ChoiceBlock(choices=[('regular', 'Regular'), ('large', 'Large Primary')])))))))), ('related_links', core_blocks.StructBlock((('heading', core_blocks.CharBlock(required=False)), ('paragraph', core_blocks.RichTextBlock(required=False)), ('links', core_blocks.ListBlock(core_blocks.StructBlock((('text', core_blocks.CharBlock(required=False)), ('url', core_blocks.CharBlock(default='/', required=False))))))))), ('reusable_text', v1.blocks.ReusableTextChooserBlock('v1.ReusableText')), ('email_signup', core_blocks.StructBlock((('heading', core_blocks.CharBlock(default='Stay informed', required=False)), ('default_heading', core_blocks.BooleanBlock(default=True, help_text='If selected, heading will be styled as an H5 with green top rule. Deselect to style header as H3.', label='Default heading style', required=False)), ('text', core_blocks.CharBlock(help_text='Write a sentence or two about what kinds of emails the user is signing up for, how frequently they will be sent, etc.', required=False)), ('gd_code', core_blocks.CharBlock(help_text='Code for the topic (i.e., mailing list) you want people who submit this form to subscribe to. Format: USCFPB_###', label='GovDelivery code', required=False)), ('disclaimer_page', core_blocks.PageChooserBlock(help_text='Choose the page that the "See Privacy Act statement" link should go to. If in doubt, use "Generic Email Sign-Up Privacy Act Statement".', label='Privacy Act statement', required=False))))), ('well', core_blocks.StructBlock((('content', core_blocks.RichTextBlock(label='Well', required=False)),))), ('well_with_ask_search', core_blocks.StructBlock((('content', core_blocks.RichTextBlock(label='Well', required=False)), ('ask_search', core_blocks.StructBlock((('show_label', core_blocks.BooleanBlock(default=True, help_text='Whether to show form label.', required=False)), ('placeholder', core_blocks.TextBlock(help_text='Text to show for the input placeholder text.', required=False))))))))))), ('expandable', core_blocks.StructBlock((('label', core_blocks.CharBlock(required=False)), ('is_bordered', core_blocks.BooleanBlock(required=False)), ('is_midtone', core_blocks.BooleanBlock(required=False)), ('is_expanded', core_blocks.BooleanBlock(required=False)), ('content', core_blocks.StreamBlock((('paragraph', core_blocks.RichTextBlock(required=False)), ('well', core_blocks.StructBlock((('content', core_blocks.RichTextBlock(label='Well', required=False)),))), ('links', core_blocks.StructBlock((('text', core_blocks.CharBlock(required=False)), ('url', core_blocks.CharBlock(default='/', required=False))))), ('email', core_blocks.StructBlock((('emails', core_blocks.ListBlock(core_blocks.StructBlock((('url', core_blocks.EmailBlock(label='Email address')), ('text', core_blocks.CharBlock(label='Link text (optional)', required=False)))))),))), ('phone', core_blocks.StructBlock((('fax', core_blocks.BooleanBlock(default=False, label='Is this number a fax?', required=False)), ('phones', core_blocks.ListBlock(core_blocks.StructBlock((('number', core_blocks.CharBlock(help_text='Do not include spaces or dashes. Ex. 8554112372', max_length=15, validators=[django.core.validators.RegexValidator(message='Enter a numeric phone number, without punctuation.', regex='^\\d*$')])), ('extension', core_blocks.CharBlock(max_length=4, required=False)), ('vanity', core_blocks.CharBlock(help_text='A phoneword version of the above number. Include any formatting. Ex. (555) 222-CFPB', max_length=15, required=False)), ('tty', core_blocks.CharBlock(help_text='Do not include spaces or dashes. Ex. 8554112372', label='TTY', max_length=15, required=False, validators=[django.core.validators.RegexValidator(message='Enter a numeric phone number, without punctuation.', regex='^\\d*$')])), ('tty_ext', core_blocks.CharBlock(label='TTY Extension', max_length=4, required=False))))))))), ('address', core_blocks.StructBlock((('label', core_blocks.CharBlock(required=False)), ('title', core_blocks.CharBlock(required=False)), ('street', core_blocks.CharBlock(required=False)), ('city', core_blocks.CharBlock(max_length=50, required=False)), ('state', core_blocks.CharBlock(max_length=25, required=False)), ('zip_code', core_blocks.CharBlock(max_length=15, required=False)))))), blank=True))))), ('expandable_group', core_blocks.StructBlock((('heading', core_blocks.CharBlock(help_text='Added as an <code>&lt;h3&gt;</code> at the top of this block. Also adds a wrapping <code>&lt;div&gt;</code> whose <code>id</code> attribute comes from a slugified version of this heading, creating an anchor that can be used when linking to this part of the page.', required=False)), ('body', core_blocks.RichTextBlock(required=False)), ('is_accordion', core_blocks.BooleanBlock(required=False)), ('has_top_rule_line', core_blocks.BooleanBlock(default=False, help_text='Check this to add a horizontal rule line to top of expandable group.', required=False)), ('expandables', core_blocks.ListBlock(core_blocks.StructBlock((('label', core_blocks.CharBlock(required=False)), ('is_bordered', core_blocks.BooleanBlock(required=False)), ('is_midtone', core_blocks.BooleanBlock(required=False)), ('is_expanded', core_blocks.BooleanBlock(required=False)), ('content', core_blocks.StreamBlock((('paragraph', core_blocks.RichTextBlock(required=False)), ('well', core_blocks.StructBlock((('content', core_blocks.RichTextBlock(label='Well', required=False)),))), ('links', core_blocks.StructBlock((('text', core_blocks.CharBlock(required=False)), ('url', core_blocks.CharBlock(default='/', required=False))))), ('email', core_blocks.StructBlock((('emails', core_blocks.ListBlock(core_blocks.StructBlock((('url', core_blocks.EmailBlock(label='Email address')), ('text', core_blocks.CharBlock(label='Link text (optional)', required=False)))))),))), ('phone', core_blocks.StructBlock((('fax', core_blocks.BooleanBlock(default=False, label='Is this number a fax?', required=False)), ('phones', core_blocks.ListBlock(core_blocks.StructBlock((('number', core_blocks.CharBlock(help_text='Do not include spaces or dashes. Ex. 8554112372', max_length=15, validators=[django.core.validators.RegexValidator(message='Enter a numeric phone number, without punctuation.', regex='^\\d*$')])), ('extension', core_blocks.CharBlock(max_length=4, required=False)), ('vanity', core_blocks.CharBlock(help_text='A phoneword version of the above number. Include any formatting. Ex. (555) 222-CFPB', max_length=15, required=False)), ('tty', core_blocks.CharBlock(help_text='Do not include spaces or dashes. Ex. 8554112372', label='TTY', max_length=15, required=False, validators=[django.core.validators.RegexValidator(message='Enter a numeric phone number, without punctuation.', regex='^\\d*$')])), ('tty_ext', core_blocks.CharBlock(label='TTY Extension', max_length=4, required=False))))))))), ('address', core_blocks.StructBlock((('label', core_blocks.CharBlock(required=False)), ('title', core_blocks.CharBlock(required=False)), ('street', core_blocks.CharBlock(required=False)), ('city', core_blocks.CharBlock(max_length=50, required=False)), ('state', core_blocks.CharBlock(max_length=25, required=False)), ('zip_code', core_blocks.CharBlock(max_length=15, required=False)))))), blank=True))))))))), ('notification', core_blocks.StructBlock((('message', core_blocks.CharBlock(help_text='The main notification message to display.', required=True)), ('explanation', core_blocks.TextBlock(help_text='Explanation text appears below the message in smaller type.', required=False)), ('links', core_blocks.ListBlock(core_blocks.StructBlock((('text', core_blocks.CharBlock(required=False)), ('url', core_blocks.CharBlock(default='/', required=False)))), help_text='Links appear on their own lines below the explanation.', required=False))))), ('table_block', v1.atomic_elements.organisms.AtomicTableBlock(table_options={'renderer': 'html'})), ('feedback', core_blocks.StructBlock((('was_it_helpful_text', core_blocks.CharBlock(default='Was this page helpful to you?', help_text='Use this field only for feedback forms that use "Was this helpful?" radio buttons.', required=False)), ('intro_text', core_blocks.CharBlock(help_text='Optional feedback intro', required=False)), ('question_text', core_blocks.CharBlock(help_text='Optional expansion on intro', required=False)), ('radio_intro', core_blocks.CharBlock(help_text='Leave blank unless you are building a feedback form with extra radio-button prompts, as in /owning-a-home/help-us-improve/.', required=False)), ('radio_text', core_blocks.CharBlock(default='This information helps us understand your question better.', required=False)), ('radio_question_1', core_blocks.CharBlock(default='How soon do you expect to buy a home?', required=False)), ('radio_question_2', core_blocks.CharBlock(default='Do you currently own a home?', required=False)), ('button_text', core_blocks.CharBlock(default='Submit')), ('contact_advisory', core_blocks.RichTextBlock(help_text='Use only for feedback forms that ask for a contact email', required=False)))))), blank=True)),
            ],
            options={
                'abstract': False,
            },
            bases=('v1.abstractfilterpage',),
        ),
        migrations.CreateModel(
            name='EnforcementActionStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('institution', models.CharField(blank=True, max_length=200)),
                ('status', models.CharField(choices=[('Post Order/Post Judgment', 'Post Order/Post Judgment'), ('Expired/Terminated/Dismissed', 'Expired/Terminated/Dismissed'), ('Pending Litigation', 'Pending Litigation')], max_length=50)),
                ('action', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='statuses', to='v1.EnforcementActionPage')),
            ],
        ),
    ]