DemocracyOS/app

View on GitHub
lib/settings/forum-new/forum-form/template.jade

Summary

Maintainability
Test Coverage
main.container
  .row
    article.forum-new-form.col-xs-12.col-md-8.col-md-offset-2
      .forum-top
        h1.forum-title= t('forum.form.title')

      form.form(action="/api/forum", method="post", role="form", novalidate, autovalidate, autosubmit)
        ul.form-errors

        .fieldsets
          fieldset
            label= t('forum.form.url.label')
            .input-group.subdomain
              div.input-group-addon
                span.desktop= domain
                span.mobile /
              input(type='text', name='name', validate='required forum', autofocus, id='hostname', autocorrect='off', autocapitalize='off')
              span.error.name-unavailable.hide=t('forum.form.url.unavailable')

          fieldset
            label= t('forum.form.title.label')
            .form-group.clearfix.title
              input(type='text', name='title', placeholder= t('forum.form.title.placeholder'), validate='required')

          fieldset
            label= t('forum.form.summary.label')
            .form-group.clearfix.summary
              input(type='text', name='summary', placeholder= t('forum.form.summary.placeholder'), maxlength=300, validate='max-length:300')

          fieldset
            label= t('forum.form.cover')
            .form-group.clearfix.summary
              input(type='text', name='cover', placeholder= t('admin-topics-form.placeholder.cover'), validate='url')

        button.btn.btn-block.btn-primary.btn-lg= t('forum.form.create.submit')