Пример #1
0
                        </div>
                    <?php 
    }
    ?>

                    <div class="form-group">
                        <?php 
    echo $form->label("usergroups", t("On purchase add user to user groups"));
    ?>
                        <div class="ccm-search-field-content ccm-search-field-content-select2">
                            <select multiple="multiple" name="pUserGroups[]" id="groupselect" class="select2-select" style="width: 100%;" placeholder="<?php 
    echo t('Select user groups');
    ?>
">
                                <?php 
    $selectedusergroups = $p->getProductUserGroups();
    foreach ($usergroups as $ugkey => $uglabel) {
        ?>
                                    <option value="<?php 
        echo $ugkey;
        ?>
" <?php 
        echo in_array($ugkey, $selectedusergroups) ? 'selected="selected"' : '';
        ?>
>  <?php 
        echo $uglabel;
        ?>
</option>
                                <?php 
    }
    ?>