<?php
use com\cminds\registration\view\SettingsView;
use com\cminds\registration\model\Labels;

$settingsView = new SettingsView();
$labelsByCategories = Labels::getLabelsByCategories();

foreach ($labelsByCategories as $category => $labels) {	
	?>
	<table class="onlyinpro">
		<caption><?php echo (empty($category) ? 'Other' : $category); ?></caption>
		<?php
		foreach ($labels as $key) {
			if ($default = Labels::getDefaultLabel($key)) {
				?>
				<tr valign="top">
					<th scope="row" valign="middle" align="left" ><?php echo esc_html($key) ?></th>
					<td>
						<?php
						/*
							?>
							<input type="text" size="60" name="label_<?php echo esc_attr($key); ?>" value="<?php echo esc_attr(Labels::getLabel($key)); ?>" placeholder="<?php echo esc_attr($default) ?>" />
							<?php
						*/
						?>
						Available in Pro version and above.
					</td>
					<td><?php echo Labels::getDescription($key); ?></td>
				</tr>
				<?php
			}
		}
		?>
	</table>
	<?php	
}
?>
<div class="onlyinpro_empty" style="display:none; padding-top:20px;"><p style="margin:0px;font-weight:normal;">Pro options are hidden. Click the button <span style="font-weight:bold;color:#00cd00;">"Show/hide Pro options"</span> to see them.</p></div>
<?php
echo $settingsView->renderSubcategory('labels', 'other');
?>