-
Notifications
You must be signed in to change notification settings - Fork 4
/
candidate.php
148 lines (111 loc) · 4.81 KB
/
candidate.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php /*
Copyright 2015 Cédric Levieux, Parti Pirate
This file is part of Recrutement.
Recrutement is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Recrutement is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Recrutement. If not, see <http://www.gnu.org/licenses/>.
*/
include_once("header.php");
require_once("engine/bo/CandidateBo.php");
require_once("engine/bo/CandidateQuestionBo.php");
$candidateBo = CandidateBo::newInstance($connection, $config);
$candidateQuestionBo = CandidateQuestionBo::newInstance($connection, $config);
$candidate = null;
if ($isConnected) {
$candidate = $candidateBo->getById($_REQUEST["id"]);
$candidateQuestions = $candidateQuestionBo->getByFilters(array("cas_candidature_id" => $_REQUEST["id"]));
$tPositions = array();
if ($candidate["can_positions"]) {
$positions = explode(",", $candidate["can_positions"]);
foreach($positions as $position) {
$tPositions[] = lang("candidate_position_$position");
}
}
$positions = implode(", ", $tPositions);
$circos = str_replace(",", ", ", $candidate["can_circos"]);
}
?>
<div class="container theme-showcase" role="main">
<ol class="breadcrumb">
<li><a href="backoffice.php"><?php echo lang("breadcrumb_backoffice"); ?></a></li>
<li><a href="candidates.php"><?php echo lang("breadcrumb_candidates"); ?></a></li>
<li class="active"><?php echo $candidate["can_lastname"]; ?> <?php echo $candidate["can_firstname"]; ?></li>
</ol>
<?php
if ($candidate) {
?>
<form class="form-horizontal" method="post" action="do_candidate.php">
<input type="hidden" name="cas_candidature_id" value="<?php echo $candidate["can_id"]; ?>">
<fieldset>
<legend>Candidat-e</legend>
<div class="form-group">
<label class="col-md-4 control-label" for="firstname">Identité</label>
<div class="col-md-4">
<input id="firstname" name="can_firstname" value="<?php echo $candidate["can_firstname"]; ?>" disabled="disabled" type="text" placeholder="Prénom" class="form-control input-md">
<p class="help-block">Prénom</p>
</div>
<div class="col-md-4">
<input id="lastname" name="can_lastname" value="<?php echo $candidate["can_lastname"]; ?>" disabled="disabled" type="text" placeholder="Nom" class="form-control input-md">
<p class="help-block">Nom</p>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="mail">Correspondance</label>
<div class="col-md-4">
<input id="mail" name="can_mail" value="<?php echo $candidate["can_mail"]; ?>" disabled="disabled" type="text" placeholder="Mail" class="form-control input-md">
<p class="help-block">Mail</p>
</div>
<div class="col-md-4">
<input id="telephone" name="can_telephone" value="<?php echo $candidate["can_telephone"]; ?>" disabled="disabled" type="text" placeholder="Téléphone" class="form-control input-md">
<p class="help-block">Téléphone</p>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="circos">Candidature</label>
<div class="col-md-4">
<input id="circos" name="can_circos" value="<?php echo $circos; ?>" disabled="disabled" type="text" placeholder="Circonscriptions" class="form-control input-md">
<p class="help-block">Circonscription</p>
</div>
<div class="col-md-4">
<input id="positions" name="can_positions" value="<?php echo $positions; ?>" disabled="disabled" type="text" placeholder="Positions" class="form-control input-md">
<p class="help-block">Position</p>
</div>
</div>
</fieldset>
<fieldset>
<legend>Questions au candidat-e</legend>
<?php
foreach($candidateQuestions as $question) {
?>
<div class="form-group">
<label class="col-md-12 control-label" for="question-<?php echo $question["cqu_id"]; ?>"><?php echo utf8_encode($question["cqu_question"]); ?></label>
<div class="col-md-12">
<textarea class="form-control answer" id="question-<?php echo $question["cqu_id"]; ?>" name="question-<?php echo $question["cqu_id"]; ?>"><?php echo $question["cas_answer"]; ?></textarea>
</div>
</div>
<?php
}
?>
<div class="form-group text-center">
<div class="col-md-12">
<button class="btn btn-primary">Enregistrer</button>
</div>
</div>
</fieldset>
</form>
<?php
}
?>
<?php include("connect_button.php"); ?>
</div>
<div class="lastDiv"></div>
<?php include("footer.php");?>
</body>
</html>