Merge pull request #19594 from eileenmcnaughton/535m
[civicrm-core.git] / setup / plugins / blocks / components.tpl.php
CommitLineData
cfb48750
TO
1<?php if (!defined('CIVI_SETUP')): exit("Installation plugins must only be loaded by the installer.\n");
2endif; ?>
4bcd4c62
TO
3<h2 id="components"><?php echo ts('Components'); ?></h2>
4
fe4a84d5
TO
5<p class="comp-error-required"><?php echo ts('At least one component must be enabled.'); ?></p>
6
4bcd4c62
TO
7<div>
8 <?php foreach ($model->getField('components', 'options') as $comp => $label): ?>
9 <input class="comp-cb sr-only" style="display: none;" type="checkbox" name="civisetup[components][<?php echo $comp; ?>]" id="civisetup[components][<?php echo $comp; ?>]" <?php echo in_array($comp, $model->components) ? 'checked' : '' ?>>
10 <label class="comp-box" for="civisetup[components][<?php echo $comp; ?>]">
11 <span class="comp-label"><?php echo $label; ?></span>
12 <span class="comp-desc"><?php echo $_tpl_block['component_labels'][$comp] ?></span>
13 </label>
14 <?php endforeach; ?>
15</div>
16
17<p class="tip">
18 <strong><?php echo ts('Tip'); ?></strong>:
19 <?php echo ts('Not sure? That\'s OK. After installing, you can enable and disable components at any time.'); ?>
20</p>
fe4a84d5
TO
21
22<script type="text/javascript">
23 csj$(function($){
24 $('.comp-cb').useValidator(function(){
25 $('.comp-error-required').toggleError($('.comp-cb:checked').length == 0);
26 });
27 });
28</script>