<?php     
defined('C5_EXECUTE') or die("Access Denied.");
/*
Concrete 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_game_edit" class="ccm-block-field-group">

<div style="margin-top:10px;" 
title="<?php  
echo t('Slide to set an number of rows for the game grid');
?>"><?php 
echo $form->label('game_rows', t('Rows: '));
echo '<span class="rows-slider">'.($game_rows?$game_rows:'18').'</span> rows';
echo $form->text('game_rows', $game_rows, array('class'=>'rows-slider'));
echo '<div class="rows-slider" style="margin-top:5px;margin-bottom:5px;margin-right:10px"></div>';
?></div>

<div style="margin-top:10px;" 
title="<?php  
echo t('Slide to set an number of columns for the game grid');
?>"><?php 
echo $form->label('game_cols', t('Columns: '));
echo '<span class="cols-slider">'.($game_cols?$game_cols:'10').'</span> columns';
echo $form->text('game_cols', $game_cols, array('class'=>'cols-slider'));
echo '<div class="cols-slider" style="margin-top:5px;margin-bottom:5px;margin-right:10px"></div>';
?></div>

<div 
style="margin-top:10px;" 
id="jl_concrete_bricks_scores_edit_date_options"
title="<?php  
echo t('Select a theme for the bricks.');
?>"><?php 
echo $form->label('iconset', t('Choose a brick theme: '));
echo $form->select('iconset', $this->controller->iconsets(), $options['iconset']);
?></div>

<div style="margin-top:10px;" 
title="<?php  
echo t('Check to show a heading above the game.');
?>"><?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 the next brick to play.');
?>"><?php 
echo $form->checkbox('options[]', 'show_next', $options['show_next'] );
echo $form->label('options[]', t('Show next brick.'));
?></div>

<div 
title="<?php  
echo t('Allow players to enter a short comment about their game.');
?>"><?php 
echo $form->checkbox('options[]', 'collect_comments', $options['collect_comments'] );
echo $form->label('options[]', t('Collect comments.'));
?></div>

<div 
title="<?php  
echo t('Only record scores for logged in users.');
?>"><?php 
echo $form->checkbox('options[]', 'require_login_for_score', $options['require_login_for_score'] );
echo $form->label('options[]', t('Only record scores for logged in users.'));
?></div>
</div>

<script type="text/javascript">
$("input.rows-slider").hide();$("div.rows-slider").slider({min:1,step:1,max:30,value:parseInt($("span.rows-slider").text(),10),slide:function(a,b){$("span.rows-slider").text(b.value);$("input.rows-slider").val(b.value)}});$("input.cols-slider").hide();$("div.cols-slider").slider({min:1,step:1,max:30,value:parseInt($("span.cols-slider").text(),10),slide:function(a,b){$("span.cols-slider").text(b.value);$("input.cols-slider").val(b.value)}});
</script>
