<commit_before><?php
/**
 * YAWIK
 *
 * @filesource
 * @license MIT
 * @copyright  2013 - 2015 Cross Solution <http://cross-solution.de>
 */

$options = $this->services('Core/Options');
$defaultCurrencyCode = $options->defaultCurrencyCode;
$defaultTaxRate = $options->defaultTaxRate;


if ($this->renderSummary): echo $this->render('jobs/form/multiposting-select');
else:
    ?>
    <div id="<?php echo $this->element->getAttribute('id') ?>" class="mcp-checkboxes">
        <?php $valueOptions = $this->element->getValueOptions();?>
        <?php foreach ($valueOptions as $category => $vOpts):?>
            <div class="row">
                <div class="col-md-12"><h4><?php echo $vOpts['label'] ?></h4></div>
            </div>
            <div class="row">
                <?php foreach ($vOpts['options'] as $v => $opt):
                    $checked = in_Array($v, $this->element->getValue());
                    $class =  $checked ? 'btn-success active' : 'btn-default';
                    $spec = explode('|', $opt)?>
                    <div class="col-md-4">
                        <?php
                        $popup=$spec[8]?'<img src="' . $spec[8]. '" alt="' . $spec[1] . '" class="img-responsive">':'' .
                            sprintf($spec[2], '<a href="' . $spec[4] . '">' . $spec[3] . '</a>');
                        ?>
                        <button style="width: 100%; margin-bottom: 3px;" type="button text-right"
                                class="mpc-button btn <?php echo $class ?>" aria-pressed="<?php echo $checked ? 'true' : 'false' ?>"
                                data-toggle="button"
                                data-placement="top" data-trigger="hover" data-html="true"
                                title="<?php echo $spec[1] ?>"
                                data-content="<?php echo $this->escapeHtmlAttr($popup);?>"
                                data-price="<?php echo $spec[7] ?>">
                            <?php echo $spec[0] ?>
                            <input <?php echo $checked ? 'checked ' : '' ?>type="checkbox" name="<?php echo $this->element->getName()?>[]" class="hidden" value="<?php echo $v ?>">
                        </button>
                    </div>
                <?php endforeach ?>
            </div>
        <?php endforeach;?>

        <div id="<?php echo $this->element->getAttribute('id') ?>-total" class="text-right" style="padding: 10px 5px">

            <strong><span></span> <?php echo $defaultCurrencyCode?></strong>

        </div>

        <?php
        // Element Templates
        $resultTmpl = '
    <div class="clearfix">
        <div class="pull-left">
            <strong>%name - %headline</strong><br><commit_msg>[Jobs] Makes checkboxes multiposting selection element disabled when editing approved job<commit_after><?php
/**
 * YAWIK
 *
 * @filesource
 * @license MIT
 * @copyright  2013 - 2015 Cross Solution <http://cross-solution.de>
 */

$options = $this->services('Core/Options');
$defaultCurrencyCode = $options->defaultCurrencyCode;
$defaultTaxRate = $options->defaultTaxRate;


if ($this->renderSummary): echo $this->render('jobs/form/multiposting-select');
else:
    $isDisabled = 'disabled' == $this->element->getAttribute('disabled');?>
    <div id="<?php echo $this->element->getAttribute('id') ?>" class="mcp-checkboxes">
        <?php $valueOptions = $this->element->getValueOptions();?>
        <?php foreach ($valueOptions as $category => $vOpts):?>
            <div class="row">
                <div class="col-md-12"><h4><?php echo $vOpts['label'] ?></h4></div>
            </div>
            <div class="row">
                <?php foreach ($vOpts['options'] as $v => $opt):
                    $checked = in_Array($v, $this->element->getValue());
                    $class =  $checked ? 'btn-success active' : 'btn-default';
                    $spec = explode('|', $opt)?>
                    <div class="col-md-4">
                        <?php
                        $popup=$spec[8]?'<img src="' . $spec[8]. '" alt="' . $spec[1] . '" class="img-responsive">':'' .
                            sprintf($spec[2], '<a href="' . $spec[4] . '">' . $spec[3] . '</a>');
                        ?>
                        <button style="width: 100%; margin-bottom: 3px;" type="button text-right"
                                class="mpc-button btn <?php echo $class ?>" aria-pressed="<?php echo $checked ? 'true' : 'false' ?>"
                                data-toggle="button"
                                data-placement="top" data-trigger="hover" data-html="true"
                                title="<?php echo $spec[1] ?>"
                                data-content="<?php echo $this->escapeHtmlAttr($popup);?>"
                                data-price="<?php echo $spec[7] ?>"<?php
                                echo $disabled ? 'disabled' : ''?>>
                            <?php echo $spec[0] ?>
                            <input <?php echo $checked ? 'checked ' : '' ?>type="checkbox" name="<?php echo $this->element->getName()?>[]" class="hidden" value="<?php echo $v ?>">
                        </button>
                    </div>
                <?php endforeach ?>
            </div>
        <?php endforeach;?>

        <div id="<?php echo $this->element->getAttribute('id') ?>-total" class="text-right" style="padding: 10px 5px">

            <strong><span></span> <?php echo $defaultCurrencyCode?></strong>

        </div>

        <?php
        // Element Templates
        $resultTmpl = '
    <div class="clearfix">
        <div class="pull-left">
            <strong>%name - %headline</strong><br>
{'fraction_non_alphanumeric': 0.1878423749779113, 'fraction_numerical': 0.010249160629086412, 'mean_word_length': 1.7813267813267812, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 140, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '524621', 'n_tokens_mistral': 1615, 'n_tokens_neox': 1562, 'n_words': 326}