-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
107 lines (100 loc) · 5.32 KB
/
index.php
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
ini_set('display_errors', 1);
ini_set('display_startup_erros', 1);
error_reporting(E_ALL);
include("content.php");
headerContent("");
breadcrumb();//cabecalho
use Util\Functions;
require_once 'lib/Functions.php';
$productArray = Functions::getEntity('product', null, null, 'name');
?>
<script src="lib/jquery3.3.1.min.js"></script>
<script>
$(document).ready(function () {
$("#product_id").on("change", function () {
$("#module_id").load("getModules.class.php?module_id=" + $('#product_id').val());
});
});
function onSkipOptionPage() {
var option = document.querySelector('input[name="option"]:checked').value;
if (option == '2') {
document.getElementById("index").action = 'step01.php';
} else if (option == '3') {
document.getElementById('product_id').required = false;
document.getElementById('module_id').required = false;
document.getElementById("index").action = 'code_generator/index.php';
} else {
document.getElementById("index").action = 'step01.php';
}
}
</script>
<div class="container">
<div class="row">
<!-- start content -->
<form class="col s12" method="POST" id="index" name="index">
<div class="card hoverable">
<div class="card-content">
<span class="card-title activator grey-text text-darken-4"><b style="font-size: 20px;">Opções de Produtos</b> <i
class="material-icons right">more_vert</i></span>
<div class="row">
<div class="col s12 m3">
<select id="product_id" name="product_id" class="browser-default" required>
<option value="-1" disabled="disabled" selected="selected">::Escolha a sua opção::
</option>
<?php
$aux = '';
foreach ($productArray as $row) {
if (is_array($row)) {
echo "<option value=" . $row['id'] . ">" . $row['description'] . "</option>";
} else if ($productArray['id'] != $aux) {
echo "<option value=" . $productArray['id'] . ">" . $productArray['description'] . "</option>";
$aux = $productArray['id'];
}
}
?>
</select>
</div>
</div>
<div class="row">
<div class="col s12 m3">
<div id="module_id"></div>
</div>
</div>
<p> </p>
<div class="row">
<input class="#0091ea light-blue accent-4" checked name="option" type="radio"
id="customize" value="1"/>
<label for="customize"><b style="color: red;">(i)</b> Não gerar CRUDs durante a
derivação do produto e implantação</label>
</div>
<div class="row">
<input class="#0091ea light-blue accent-4" name="option" type="radio"
id="customize2" value="2"/>
<label for="customize2"><b style="color: red;">(ii)</b> Gerar CRUDs de alguma
tabela do produto durante a derivação e implantação</label>
</div>
<div class="row">
<input class="#0091ea light-blue accent-4" name="option" type="radio"
id="customize3" value="3"/>
<label for="customize3"><b style="color: red;">(iii)</b> Ir direto para o geração
de CRUDs</label>
</div>
</div><!-- /.card-content -->
<div class="card-action">
<button type="submit" class="btn #4caf50 green" onclick="onSkipOptionPage()">Próximo<i
class="material-icons right">arrow_forward</i>
</button>
</div>
<div class="card-reveal">
<span class="card-title grey-text text-darken-4">Sobre<i class="material-icons right">close</i></span>
<p>Here is some more information about this product that is Wizard for Clone-and-own with
Software Product Line, your object is helps development system, clone and deploy the
application easy.</p>
</div>
</div><!-- /.row -->
</form>
</div>
</div>
<?php
footerContent("");