summaryrefslogtreecommitdiff
path: root/core/views/welcome_package.html.php
blob: d2d7af7a90b754077e1991f1fccebc5a594599ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script>
$("#package").ready(function() {
  ajaxify_package_form();
});

function ajaxify_package_form() {
  $("#package form").ajaxForm({
    dataType: "json",
    success: function(data) {
      if (data.result == "success") {
        $("#package .success").html(data.message);
        $("#package .success").removeClass("gHide");
        $("#package .error").addClass("gHide");
      } else {
        $("#package .error").html(data.message);
        $("#package .error").removeClass("gHide");
        $("#package .success").addClass("gHide");
      }
    }
  });
};

</script>
<p>Press the button to extract the initial database configuration.</p>
<form action="<?= url::site("welcome/package") ?>" method="POST">
 <table style="width: 400px">
   <tr>
     <th align="left">Include</th>
     <th align="left">Module</th>
   </tr>
   <? foreach ($installed as $module_name => $required): ?>
   <tr>
     <td>
       <input type="checkbox" name="include[]" value="<?= $module_name ?>" checked
         <? if (!empty($required)): ?> disabled="disabled"<? endif ?>
       />
     </td>
     <td><?= $module_name ?></td>
   </tr>
   <? endforeach ?>
   <tr>
     <td colspan="2" align="center">
       <input type="Submit" value="Package" />
      </td>
   </tr>
 </table>
 <div id="SuccessMsg" class="success gHide"></div>
 <div id="FailMsg" class="error gHide"></div>
</form>