<?php     
defined('C5_EXECUTE') or die("Access Denied.");
/*
Concrete5 Bricks Game by John Liddiard (aka JohntheFish)
www.jlunderwater.co.uk
This software is licensed under the terms described in the concrete5.org marketplace. 
Please find the add-on there for the latest license copy.
*/
$form = Loader::helper('form');
?>

<div id="jl_concrete_bricks_scores_edit" class="ccm-block-field-group">


<div 
title="<?php  
echo t('Check to show a default heading above the results table.');
?>"><?php 
echo $form->checkbox('options[]', 'show_heading', $options['show_heading'] );
echo $form->label('options[]', t('Show heading.'));
?></div>

<div 
title="<?php  
echo t('Check to show a column headings in the results table.');
?>"><?php 
echo $form->checkbox('options[]', 'show_col_headings', $options['show_col_headings'] );
echo $form->label('options[]', t('Show column headings.'));
?></div>


<div style="margin-top:10px;" 
title="<?php  
echo t('Slide to set an number of top scores to show');
?>"><?php 
echo $form->label('show_best', t('Show top: '));
echo '<span class="show-best-slider">'.($show_best?$show_best:'10').'</span> scores';
echo $form->text('show_best', $show_best, array('class'=>'show-best-slider'));
echo '<div class="show-best-slider" style="margin-top:5px;margin-bottom:5px;margin-right:10px"></div>';

?></div>


<div style="margin-top:10px;" 
title="<?php  
echo t('Normally scores will be shown for all users. Check to show for just the current user');
?>"><?php 
echo $form->checkbox('options[]', 'current_user_only', $options['current_user_only'] );
echo $form->label('options[]', t('Show current user only.'));
?></div>

<div 
title="<?php  
echo t('Players may enter a comment to go with their score. Check to show this comment.');
?>"><?php 
echo $form->checkbox('options[]', 'comment', $options['comment'] );
echo $form->label('options[]', t('Show comments.'));
?></div>

<div title="<?php  
echo t('Check to show date & time that the score was achieved.');
?>"><?php 
echo $form->checkbox('options[]', 'GameDate', $options['GameDate']);
echo $form->label('options[]', t('Show date and time of game.'));
?></div>
<div id="jl_concrete_bricks_scores_edit_date_options"><?php 
echo $form->label('dt_format_option', t('Select how the game date/time will be shown: '));
echo $form->select('dt_format_option', $this->controller->allDateTimeFormatOptions(), $options['dt_format_option']);
?></div>

<div 
title="<?php  
echo t('Check to show the time taken to achieve the score. Where scores are equal, the lower time ranks higher.');
?>"><?php 
echo $form->checkbox('options[]', 'time_taken', $options['time_taken'] );
echo $form->label('options[]', t('Show time taken.'));
?></div>

<div 
title="<?php  
echo t('Check to show the number of lines completed.');
?>"><?php 
echo $form->checkbox('options[]', 'completed_lines', $options['completed_lines'] );
echo $form->label('options[]', t('Show lines completed.'));
?></div>

<div 
title="<?php  
echo t('Check to show the level achieved.');
?>"><?php 
echo $form->checkbox('options[]', 'level_achieved', $options['level_achieved'] );
echo $form->label('options[]', t('Show level achieved.'));
?></div>

<div 
title="<?php  
echo t('Check to force the results table to show borders. This may over-ride some theme styles.');
?>"><?php 
echo $form->checkbox('options[]', 'show_borders', $options['show_borders'] );
echo $form->label('options[]', t('Show results table borders.'));
?></div>

</div>
<script type="text/javascript">
$("input.show-best-slider").hide();$("div.show-best-slider").slider({min:1,step:1,max:50,value:parseInt($("span.show-best-slider").text(),10),slide:function(a,b){$("span.show-best-slider").text(b.value);$("input.show-best-slider").val(b.value)}});$("#options_GameDate").change(function(){$("#jl_concrete_bricks_scores_edit_date_options").toggle($("#options_GameDate:checked").length>0)}).change();
</script>
