<!-- module-properties -->

<?php

/**
 * Default settings
 *
 * @category   Module (module-properties)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   1.0
 */

	if(!isset($module_settings[$_GET['module-to-edit']]["language"])) $module_settings[$_GET['module-to-edit']]["language"] = '';
	if(!isset($module_settings[$_GET['module-to-edit']]["margin top"])) $module_settings[$_GET['module-to-edit']]["margin top"] = 0;
	if(!isset($module_settings[$_GET['module-to-edit']]["margin left"])) $module_settings[$_GET['module-to-edit']]["margin left"] = 0;
	if(!isset($module_settings[$_GET['module-to-edit']]["css class"])) $module_settings[$_GET['module-to-edit']]["css class"] = '';
	if(!isset($module_settings[$_GET['module-to-edit']]["css id"])) $module_settings[$_GET['module-to-edit']]["css id"] = '';

/**
 * Get lists for CSS classes and ID's
 *
 * @category   Module (module-properties)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-07-26
 */

	// Get CSS classes and IDs
	$css_classes = explode(',', $template_data['css selectors']);
	if(!isset($css_classes[0]) || $css_classes[0] == '') $css_classes = array();
	
	$css_ids = explode(',', $template_data['css ids']);
	if(!isset($css_ids[0]) || $css_ids[0] == '') $css_ids = array();
	
/**
 * Backend template
 *
 * @category   Module (module-properties)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-08-31
 */
	
?>

<h4><?php echo txt('module-properties', 'title: module-properties'); ?></h4>
   	
<div class="column">
   	<div class="drop-down">
   		<label for="css_class"><?php echo txt('module-properties', 'Layout-Klasse'); ?>:</label>
   		<input type="text" name="css_class" id="css_class" class="text" value="<?php echo clean_output($module_settings[$_GET['module-to-edit']]["css class"]); ?>">
   		
   		<?php if(count($css_classes) > 0) { ?>
	   		<a class="toggler for-input" href="#css_class">&nbsp;</a><br>
	   		<div class="list">
   				<?php foreach($css_classes as $class) if(trim($class) != '') echo '<a onclick="document.getElementById(\'css_class\').value = \'' . trim($class) . '\'; return false">' . trim($class) . '</a>'; ?>
   			</div>
   		<?php } ?>
   	</div>
	
   	<div class="drop-down">
	    <label for="css_id"><?php echo txt('module-properties', 'Layout-ID'); ?>:</label>
    	<input type="text" name="css_id" id="css_id" class="text" value="<?php echo clean_output($module_settings[$_GET['module-to-edit']]["css id"]); ?>">
   		
   		<?php if(count($css_ids) > 0) { ?>
	   		<a class="toggler for-input" href="#css_id">&nbsp;</a><br>
	   		<div class="list">
	   			<?php foreach($css_ids as $id) if($id != '') echo '<a onclick="document.getElementById(\'css_id\').value = \'' . trim($id) . '\'; return false">' . trim($id) . '</a>'; ?>
	   		</div>
	   	<?php } ?>
   	</div>
   	
   	<?php connector('module-properties left'); ?>
</div>

<div class="column last-column">
   	<div class="drop-down">
	    <label for="language"><?php echo txt('module-properties', 'Sprache'); ?>:</label>
    	<input type="text" name="language" id="language" class="text" value="<?php echo clean_output($module_settings[$_GET['module-to-edit']]["language"]); ?>">
   		
   		<?php if(count($frontend_languages) > 0) { ?>
	   		<a class="toggler for-input" href="#language">&nbsp;</a><br>
   			<div class="list">
	   			<?php foreach($frontend_languages as $language) if($language != '') echo '<a onclick="document.getElementById(\'language\').value = \'' . trim($language) . '\'; return false">' . trim($language) . '</a>'; ?>
	   		</div>
	   	<?php } ?>
   	</div>
   	
   	<br>

    <p>
    	<input type="text" class="number" style="margin-right: 0" id="margin_top" name="margin_top" value="<?php echo clean_output($module_settings[$_GET['module-to-edit']]["margin top"]); ?>"> × <input type="text" class="number" id="margin_left" name="margin_left" value="<?php echo clean_output($module_settings[$_GET['module-to-edit']]["margin left"]); ?>">
    	<label class="checkbox" for="margin_top"><?php echo txt('module-properties', 'Abstand (px)'); ?></label>
    </p>
    
    <?php connector('module-properties right'); ?>
</div>
    
<div style="clear: both"></div>
