{block name='snippets-checkbox'}
    {if empty($cPost_arr)}
        {assign var=cPost_arr value=null}
    {/if}
    {if empty($cPost_arr)}
        {assign var=cPost_arr value=$smarty.post}
    {/if}

    {getCheckBoxForLocation nAnzeigeOrt=$nAnzeigeOrt cPlausi_arr=$cPlausi_arr cPost_arr=$cPost_arr assign='checkboxes'}
    {if !empty($checkboxes)}
        {block name='snippets-checkbox-checkboxes'}
            {foreach $checkboxes as $cb}
                {formgroup class="snippets-checkbox-wrapper exclude-from-label-slide" description="{if !empty($cb->cBeschreibung)}{$cb->cBeschreibung}{/if}"}
                    {block name='snippets-checkbox-checkbox'}
                        {if !isset($cb->identifier) || $cb->identifier !== 'RightOfWithdrawalOfDownloadItems' || ($cb->identifier === 'RightOfWithdrawalOfDownloadItems' && (isset($hasDownloads) && $hasDownloads === true))}
                            <div class="custom-control custom-checkbox custom-control-inline">
                                <input class="custom-control-input"
                                    type="checkbox" id="{if isset($cIDPrefix)}{$cIDPrefix}_{/if}{$cb->cID}"
                                    name="{$cb->cID}"
                                    {if $cb->nPflicht === 1}required{/if}
                                    {if $cb->isActive}checked{/if}
                                >
                                <label for="{if isset($cIDPrefix)}{$cIDPrefix}_{/if}{$cb->cID}" class="custom-control-label">
                                    {block name='snippets-checkbox-checkbox-name'}
                                        {nl2br($cb->cName)}
                                    {/block}
                                    {if !empty($cb->cLinkURL)}
                                        {block name='snippets-checkbox-checkbox-more-link'}
                                            <span class='moreinfo'>
                                                (<a href="{$cb->cLinkURL}" class='popup checkbox-popup'>{lang key='read' section='account data'}</a>)
                                            </span>
                                        {/block}
                                    {/if}
                                    {if empty($cb->nPflicht)}
                                        {block name='snippets-checkbox-checkbox-optional'}
                                            <span class='optional'> - {lang key='optional'}</span>
                                        {/block}
                                    {/if}
                                </label>
                            </div>
                        {/if}
                    {/block}
                {/formgroup}
            {/foreach}
        {/block}
    {/if}
{/block}
