Merge pull request #19594 from eileenmcnaughton/535m
[civicrm-core.git] / setup / plugins / blocks / requirements.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="requirements"><?php echo ts('System Requirements'); ?></h2>
4
5<?php
6if (count($reqs->getErrors()) > 0):
7 ?><p class="error"><?php echo ts('We are not able to install the software. Please review the errors and warnings below.'); ?></p><?php
8elseif (count($reqs->getWarnings()) > 0):
9 ?><p class="warning"><?php echo ts('There are some issues that we recommend you look at before installing. However, you are still able to install the software.'); ?></p><?php
10else:
11 ?><p class="good"><?php echo ts("You're ready to install!"); ?></p><?php
12endif;
13?>
14
15<?php
16$msgs = array_filter($reqs->getMessages(), function($m) {
17 return $m['severity'] != 'info';
18});
19uasort($msgs, function($a, $b) {
20 return strcmp(
21 $a['severity'] . '-' . $a['section'] . '-' . $a['name'],
22 $b['severity'] . '-' . $b['section'] . '-' . $b['name']
23 );
24});
25?>
26
27<table class="reqTable">
28 <thead>
29 <tr>
30 <th width="10%"><?php echo ts('Severity'); ?></th>
31 <th width="10%"><?php echo ts('Section'); ?></th>
32 <th width="20%"><?php echo ts('Name'); ?></th>
33 <th width="69%"><?php echo ts('Details'); ?></th>
34 </tr>
35 </thead>
36 <tbody>
37 <?php foreach ($msgs as $msg):?>
38 <tr class="<?php echo 'reqSeverity-' . $msg['severity']; ?>">
39 <td><?php echo htmlentities($_tpl_block['severity_labels'][$msg['severity']]); ?></td>
2e1f50d6 40 <td><?php echo htmlentities($_tpl_block['section_labels'][$msg['section']] ?? $msg['section']); ?></td>
4bcd4c62
TO
41 <td><?php echo htmlentities($msg['name']); ?></td>
42 <td><?php echo htmlentities($msg['message']); ?></td>
43 </tr>
44 <?php endforeach; ?>
45 </tbody>
46</table>
47
48<div class="action-box">
cbd83dde 49 <button id="recheck_button" type="submit" name="civisetup[action][Start]"><?php echo htmlentities(ts('Refresh')); ?></button>
4bcd4c62
TO
50 <div class="advancedTip">
51 <?php echo ts('After updating your system, refresh to test the requirements again.'); ?>
52 </div>
53</div>