<commit_before><?php defined('C5_EXECUTE') or die("Access Denied.");  ?>

<fieldset>
    <legend>
        <button class="btn btn-xs pull-right btn-default" type="button" id="ccm-block-share-this-page-add-service"><?=t('Add Service')?></button>
        <?=t('Services')?>
    </legend>
    <div id="ccm-block-share-this-page-service-wrapper">

    </div>
</fieldset>


<script type="text/template" class="service-template">
<div class="form-group">
    <a href="#" data-remove="service" class="pull-right"><i class="fa fa-minus-circle"></i></a>
    <label class="control-label">
    <?=t('Choose Sharing Service')?></label>
    <select name="service[]" class="form-control">
        <? foreach($services as $service) { ?>
            <option value="<?=$service->getHandle()?>" <% if ($service == '<?=$service->getHandle()?>') { %>selected<% } %>><?=$service->getName()?></option>
        <? } ?>
    </select>
</div>
</script>

<script type="text/javascript">
$(function() {
    var selectedServices = <?=$selected?>;
    var _template = _.template(
        $('script.service-template').html()
    );
    $('#ccm-block-share-this-page-add-service').on('click', function() {
        $('#ccm-block-share-this-page-service-wrapper').append(
            _template({service: false})
        );
    });

    $('#ccm-block-share-this-page-service-wrapper').on('click', 'a[data-remove=service]', function(e) {
        e.preventDefault();
        $(this).parent().remove();
    });
<commit_msg>Update form.php<commit_after><?php defined('C5_EXECUTE') or die("Access Denied.");  ?>

<fieldset>
    <legend>
        <button class="btn btn-xs pull-right btn-default" type="button" id="ccm-block-share-this-page-add-service"><?=t('Add Service')?></button>
        <?=t('Services')?>
    </legend>
    <div id="ccm-block-share-this-page-service-wrapper">

    </div>
</fieldset>


<script type="text/template" class="service-template">
<div class="form-group">
    <a href="#" data-remove="service" class="pull-right"><i class="fa fa-minus-circle"></i></a>
    <label class="control-label">
    <?=t('Choose Sharing Service')?></label>
    <select name="service[]" class="form-control">
        <? foreach($services as $service) { ?>
            <option value="<?=$service->getHandle()?>" <% if (service == '<?=$service->getHandle()?>') { %>selected<% } %>><?=$service->getName()?></option>
        <? } ?>
    </select>
</div>
</script>

<script type="text/javascript">
$(function() {
    var selectedServices = <?=$selected?>;
    var _template = _.template(
        $('script.service-template').html()
    );
    $('#ccm-block-share-this-page-add-service').on('click', function() {
        $('#ccm-block-share-this-page-service-wrapper').append(
            _template({service: false})
        );
    });

    $('#ccm-block-share-this-page-service-wrapper').on('click', 'a[data-remove=service]', function(e) {
        e.preventDefault();
        $(this).parent().remove();
    });

{'fraction_non_alphanumeric': 0.23846412933647693, 'fraction_numerical': 0.0006736274840013472, 'mean_word_length': 3.4931921331316187, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 79, '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': '6192587', 'n_tokens_mistral': 962, 'n_tokens_neox': 959, 'n_words': 147}