<commit_before><div id='logsFormAdd' align='right'>
    <img id="closeNewLog" src="<?php echo $base; ?>/img/blue-document--minus.png" title="minimize add new log" alt="minimize add new log" class="NewLog_icons" style="display:none"  />
    <img id="addNewLog" src="<?php echo $base; ?>/img/blue-document--plus.png" title="add new log" alt="add new log" class="NewLog_icons" />
</div>
<div id="logForm" class="logs form" style="display: none" >
    <?php echo $this->Form->create('log', array('id' => 'mainFormId', 'action' => 'add')); ?>
    <fieldset id='logFormFieldset'>
        <legend><?php __('Add a New Log'); ?></legend>
        <?php if (!$session->check('Auth.User.name')) { ?>
            <div id='logFormCredentials'>
                <div id="credentials">
                    <div id='logFormUsername'><?php echo $this->Form->input('username', array('label' => 'Username')); ?></div>
                    <div id='logFormPassword'><?php echo $this->Form->input('password', array('label' => 'Password')); ?></div>
                </div>
            </div>
        <?php } ?>
        <div id='logFormContainer'>
            <div id='logFormInfo'>
                <?php //echo $this->Form->input('subject', array('type' => 'hidden')); ?>
                <div id='logFormDescription'>
                    <?php echo $this->Form->input('description', array('type' => 'textarea', 'rows' => '12')); ?>
                </div>
            </div>
            <div id='logFormSelects'>
                <div id='logFormLevels'><?php echo $this->Form->input('level'); ?></div>
                <div id='logFormLogbooks'><?php echo $this->Form->input('logbooks', array('type' => 'select', 'multiple' => true, 'size' => 4, 'id' => 'logbook_select')); ?></div>
                <div id='logFormTags'><?php echo $this->Form->input('tags', array('type' => 'select', 'multiple' => true, 'size' => 4)); ?></div>
                <?php echo $form->submit('submit', array('disabled' => true)); ?>
            </div>
        </div>
        <?php echo $form->end(); ?>
    </fieldset>
</div>

<script type="text/javascript" >
    // You cannot add a new log entry unless at least one logbook has been specified
    $('#logbook_select').change(function(){
        if ($(this).val() != null) {
            $('input[type=submit]').attr('disabled', false);
        }
        else {
            $('input[type=submit]').attr('disabled', true);
        }
    });
    
    // Prevent double submitting
    $('#mainFormId').submit(function(){
        $('input[type=submit]', this).attr('enabled', 'disabled');
    });
    
    // Switch icon back and forth upon clicking
    $('#addNewLog').click(function() {
        $('#logForm').show('fast');
        $('#addNewLog').hide();
        $('#closeNewLog').show();
    });
    $('#closeNewLog').click(function() {
        $('#logForm').hide();
        $('#closeNewLog').hide();
        $('#addNewLog').show();
    });
</script><commit_msg>Use new icons<commit_after><div id='logsFormAdd' align='right'>
    <img id="closeNewLog" src="<?php echo $base; ?>/img/logentry-minus.png" title="minimize add new log" alt="minimize add new log" class="NewLog_icons" style="display:none"  />
    <img id="addNewLog" src="<?php echo $base; ?>/img/logentry-add.png" title="add new log" alt="add new log" class="NewLog_icons" />
</div>
<div id="logForm" class="logs form" style="display: none" >
    <?php echo $this->Form->create('log', array('id' => 'mainFormId', 'action' => 'add')); ?>
    <fieldset id='logFormFieldset'>
        <legend><?php __('Add a New Log'); ?></legend>
        <?php if (!$session->check('Auth.User.name')) { ?>
            <div id='logFormCredentials'>
                <div id="credentials">
                    <div id='logFormUsername'><?php echo $this->Form->input('username', array('label' => 'Username')); ?></div>
                    <div id='logFormPassword'><?php echo $this->Form->input('password', array('label' => 'Password')); ?></div>
                </div>
            </div>
        <?php } ?>
        <div id='logFormContainer'>
            <div id='logFormInfo'>
                <?php //echo $this->Form->input('subject', array('type' => 'hidden')); ?>
                <div id='logFormDescription'>
                    <?php echo $this->Form->input('description', array('type' => 'textarea', 'rows' => '12')); ?>
                </div>
            </div>
            <div id='logFormSelects'>
                <div id='logFormLevels'><?php echo $this->Form->input('level'); ?></div>
                <div id='logFormLogbooks'><?php echo $this->Form->input('logbooks', array('type' => 'select', 'multiple' => true, 'size' => 4, 'id' => 'logbook_select')); ?></div>
                <div id='logFormTags'><?php echo $this->Form->input('tags', array('type' => 'select', 'multiple' => true, 'size' => 4)); ?></div>
                <?php echo $form->submit('submit', array('disabled' => true)); ?>
            </div>
        </div>
        <?php echo $form->end(); ?>
    </fieldset>
</div>

<script type="text/javascript" >
    // You cannot add a new log entry unless at least one logbook has been specified
    $('#logbook_select').change(function(){
        if ($(this).val() != null) {
            $('input[type=submit]').attr('disabled', false);
        }
        else {
            $('input[type=submit]').attr('disabled', true);
        }
    });
    
    // Prevent double submitting
    $('#mainFormId').submit(function(){
        $('input[type=submit]', this).attr('enabled', 'disabled');
    });
    
    // Switch icon back and forth upon clicking
    $('#addNewLog').click(function() {
        $('#logForm').show('fast');
        $('#addNewLog').hide();
        $('#closeNewLog').show();
    });
    $('#closeNewLog').click(function() {
        $('#logForm').hide();
        $('#closeNewLog').hide();
        $('#addNewLog').show();
    });
</script>
{'fraction_non_alphanumeric': 0.22500422940280831, 'fraction_numerical': 0.0013534088986635088, 'mean_word_length': 2.620330679730557, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 169, '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': '5557300', 'n_tokens_mistral': 1765, 'n_tokens_neox': 1767, 'n_words': 383}