$newline never
#{fragment}
$case formLayout
  $of FormDBTablePagesize
    $forall view <- fieldViews
      <div style="display: inline-block">
        <label .form-group-label.label-pagesize for=#{fvId view}>#{fvLabel view}
        ^{fvInput view}
  $of _
    $forall view <- fieldViews
      $if fvId view == idFormSectionNoinput
        <div .form-section-title .interactive-fieldset__target :isFormVertical:.form--vertical>
          <h3>
            ^{fvLabel view}
          $maybe hint <- fvTooltip view
            <div .form-section-title__hint .interactive-fieldset__target :isFormVertical:.form--vertical>
              ^{hint}
      $elseif fvId view == idFormMessageNoinput
        <div .form-section-notification .interactive-fieldset__target :isFormVertical:.form--vertical>
          ^{fvInput view}
      $else
        <div .form-group .interactive-fieldset__target :fvRequired view && not isFormWorkflowDataset:.form-group--required :fvRequired view && isFormWorkflowDataset:.form-group--potentially-required :not $ fvRequired view:.form-group--optional :isJust $ fvErrors view:.form-group--has-error :isFormVertical:.form--vertical>
          $if not (Blaze.null $ fvLabel view)
            <label .form-group-label for=#{fvId view}>
              <span .form-group-label__caption>
                #{fvLabel view}
              $maybe hint <- fvTooltip view
                <div .form-group-label__hint>^{hint}
          <div .form-group__input>
            ^{fvInput view}
            $maybe err <- fvErrors view
              <div .form-error>
                #{err}
    $if formHasRequiredFields && not isFormVertical
      <div .form-section-legend>
        $case formLayout
          $of FormWorkflowDataset
            <span .form-group__potentially-required-marker>
            _{MsgAFormFieldWorkflowDatasetTip}
          $of _
            <span .form-group__required-marker>
            _{MsgAFormFieldRequiredTip}
