Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libriciel
web-DPO
Commits
31d9d56c
Commit
31d9d56c
authored
Mar 09, 2020
by
tguillon
Browse files
Correction : add, edit, show d'un traitement en tenant compte de la version 1.1.0
parent
dccb0abd
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Config/Schema/CreationBase/patchs/1.1.0_to_1.2.0.sql
View file @
31d9d56c
...
...
@@ -73,9 +73,14 @@ ALTER TABLE formulaires ADD COLUMN usetransferthorsue BOOLEAN DEFAULT FALSE;
ALTER
TABLE
formulaires
ADD
COLUMN
usedonneessensible
BOOLEAN
DEFAULT
FALSE
;
ALTER
TABLE
formulaires
ADD
COLUMN
useallextensionfiles
BOOLEAN
DEFAULT
FALSE
;
ALTER
TABLE
formulaires
ADD
COLUMN
oldformulaire
BOOLEAN
DEFAULT
FALSE
;
UPDATE
formulaires
SET
oldformulaire
=
true
;
ALTER
TABLE
formulaires
ALTER
COLUMN
soustraitant
DROP
NOT
NULL
;
ALTER
TABLE
formulaires
ALTER
COLUMN
active
DROP
NOT
NULL
;
ALTER
TABLE
formulaires
ALTER
COLUMN
active
SET
DEFAULT
FALSE
;
UPDATE
formulaires
SET
active
=
false
;
--
-- ALTER TABLE fg_champs TO champs
...
...
@@ -102,6 +107,11 @@ ALTER TABLE fiches
ALTER
TABLE
fiches
ADD
COLUMN
soustraitance
BOOL
NOT
NULL
DEFAULT
FALSE
;
--
-- on passe le champ concernant la soutraitance à true en fonction si la fiche à un soustraitant
--
UPDATE
fiches
SET
soustraitance
=
true
WHERE
soustraitantid
IS
NOT
NULL
;
--
-- ALTER TABLE modeles
--
...
...
@@ -109,4 +119,35 @@ ALTER TABLE modeles
DROP
CONSTRAINT
modeles_formulaires_id_fkey
,
ADD
CONSTRAINT
modeles_formulaires_id_fkey
FOREIGN
KEY
(
formulaires_id
)
REFERENCES
formulaires
(
id
)
ON
DELETE
CASCADE
ON
UPDATE
CASCADE
;
DELETE
FROM
valeurs
WHERE
champ_name
IN
(
'raisonsociale'
,
'telephone'
,
'fax'
,
'adresse'
,
'email'
,
'sigle'
,
'siret'
,
'ape'
,
'civiliteresponsable'
,
'nomresponsable'
,
'prenomresponsable'
,
'fonctionresponsable'
,
'emailresponsable'
,
'telephoneresponsable'
,
'dpo'
,
'numerodpo'
,
'fixDpo'
,
'portableDpo'
,
'emailDpo'
,
'soustraitantid'
,
'id'
)
AND
fiche_id
IN
(
SELECT
fiche_id
FROM
etat_fiches
WHERE
etat_fiches
.
actif
=
true
AND
etat_fiches
.
etat_id
NOT
IN
(
5
,
7
,
9
)
);
COMMIT
;
app/Config/webdpo.inc.default
View file @
31d9d56c
...
...
@@ -88,7 +88,7 @@ define('FORMAT_DATE', '%e-%m-%Y');
define
(
'FORMAT_DATE_HEURE'
,
'%e-%m-%Y à %H:%M'
);
//Validation champs Nom, Prenom etc...
define
(
'REGEXP_ALPHA_FR'
,
'
/^[a-zA-Z\-ÂÀâàÇçÉÊÈËéêèëÎÏîïÔÖôöÛÙûù ]*$/i
'
);
define
(
'REGEXP_ALPHA_FR'
,
""
/^
[
a
-
zA
-
Z
\
'
-ÂÀâàÇçÉÊÈËéêèëÎÏîïÔÖôöÛÙûù ]*$/i
"
);
//Validation champs email
define('
REGEXP_EMAIL_FR
', '
/^
[
a
-
zA
-
Z1
-
9
\
-@.
_
]
*
$
/
i
');
...
...
app/Controller/Component/DroitsComponent.php
View file @
31d9d56c
...
...
@@ -338,16 +338,17 @@ class DroitsComponent extends Component {
{
if
(
$this
->
Session
->
read
(
'Organisation.id'
)
!=
null
)
{
$Organisation
=
ClassRegistry
::
init
(
'Organisation'
);
$
dpo_id
=
$Organisation
->
find
(
'first'
,
[
$
organisationDPO
=
$Organisation
->
find
(
'first'
,
[
'conditions'
=>
[
'Organisation.id'
=>
$this
->
Session
->
read
(
'Organisation.id'
)
],
'fields'
=>
[
'Organisation.dpo'
'Organisation.dpo'
,
'Organisation.numerodpo'
]
]);
if
(
!
empty
(
$
dpo_id
))
{
if
(
!
empty
(
$
organisationDPO
[
'Organisation'
][
'dpo'
]
&&
!
empty
(
$organisationDPO
[
'Organisation'
][
'numerodpo'
])
))
{
return
true
;
}
}
...
...
app/Controller/FichesController.php
View file @
31d9d56c
This diff is collapsed.
Click to expand it.
app/Controller/FormulairesController.php
View file @
31d9d56c
...
...
@@ -63,6 +63,7 @@ class FormulairesController extends AppController {
'libelle'
,
'active'
,
'description'
,
'oldformulaire'
,
'created'
],
'order'
=>
[
...
...
@@ -367,6 +368,20 @@ class FormulairesController extends AppController {
throw
new
ForbiddenException
(
__d
(
'default'
,
'default.flasherrorPasDroitPage'
));
}
$oldFormulaire
=
$this
->
Formulaire
->
find
(
'first'
,
[
'conditions'
=>
[
'id'
=>
$id
],
'fields'
=>
[
'oldformulaire'
]
]);
if
(
$oldFormulaire
[
'Formulaire'
][
'oldformulaire'
]
===
true
)
{
$this
->
Session
->
setFlash
(
__d
(
'default'
,
'default.flasherrorPasDroitPage'
),
'flasherror'
);
$this
->
redirect
(
$this
->
Referers
->
get
());
}
$success
=
true
;
$this
->
Formulaire
->
begin
();
...
...
@@ -434,10 +449,11 @@ class FormulairesController extends AppController {
],
'fields'
=>
[
'libelle'
,
'active'
'active'
,
'oldformulaire'
]
]);
if
(
empty
(
$formulaire
))
{
if
(
empty
(
$formulaire
)
||
$formulaire
[
'Formulaire'
][
'oldformulaire'
]
===
true
)
{
$this
->
Session
->
setFlash
(
__d
(
'default'
,
'default.flasherrorPasDroitPage'
),
'flasherror'
);
$this
->
redirect
(
$this
->
Referers
->
get
());
}
...
...
app/Locale/fra/LC_MESSAGES/fiche.po
View file @
31d9d56c
...
...
@@ -366,7 +366,7 @@ msgid "fiche.textInfoSousTraitanceComplementaire"
msgstr "Information complémentaire concernant la sous-traitance(s) :"
msgid "fiche.champSoustraitance"
msgstr "Le traitement l'objet d'une sous-traitance ?"
msgstr "Le traitement
fait
l'objet d'une sous-traitance ?"
###############################################################################
...
...
app/Model/EtatFiche.php
View file @
31d9d56c
...
...
@@ -39,6 +39,12 @@ class EtatFiche extends AppModel {
const
INITIALISATION_TRAITEMENT
=
11
;
// Initialisation du traitement par le DPO
const
REDACTION_TRAITEMENT_INITIALISE
=
12
;
// Rédaction du traitement initialisé
const
LISTE_ETAT_TRAITEMENT_REGISTRE
=
[
EtatFiche
::
VALIDER_DPO
,
EtatFiche
::
ARCHIVER
,
EtatFiche
::
MODIFICATION_TRAITEMENT_REGISTRE
];
/**
* belongsTo associations
*
...
...
app/Model/Fiche.php
View file @
31d9d56c
...
...
@@ -627,6 +627,9 @@ class Fiche extends AppModel {
* @author Théo GUILLON <theo.guillon@libriciel.coop>
*/
private
function
_preparationGenerationValeurTraitement
(
$id
,
$donnees
,
$historique
)
{
//@TODO à revoir suite au modification des traitemenss
debug
(
"A REVOIR"
);
die
;
$data
=
$this
->
Valeur
->
find
(
'all'
,
[
'conditions'
=>
[
'fiche_id'
=>
$id
...
...
app/Model/WebdpoFiche.php
View file @
31d9d56c
This diff is collapsed.
Click to expand it.
app/View/Elements/Fiches/oldTabs/ongletCoresponsable.ctp
View file @
31d9d56c
...
...
@@ -21,11 +21,15 @@ if (!empty($responsables)) {
<?php
echo
$this
->
WebcilForm
->
input
(
'coresponsableid'
,
[
'id'
=>
'coresponsableid'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champCoresponsableid'
)
],
'class'
=>
'form-control usersDeroulant'
,
'options'
=>
Hash
::
combine
(
$responsables
,
'{n}.Responsable.id'
,
'{n}.Responsable.raisonsocialestructure'
),
'empty'
=>
true
,
'multiple'
=>
false
,
'required'
=>
true
,
// 'value' => $coresponsableid,
'data-placeholder'
=>
__d
(
'fiche'
,
'fiche.placeholderChampCoresponsable'
)
]);
?>
...
...
@@ -46,20 +50,29 @@ if (!empty($responsables)) {
<div
class=
"col-md-6"
>
<?php
echo
$this
->
WebcilForm
->
inputs
([
'nomcoresponsable'
=>
[
'
WebdpoFiche.
nomcoresponsable'
=>
[
'id'
=>
'nomcoresponsable'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champNomcoresponsable'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'prenomcoresponsable'
=>
[
'
WebdpoFiche.
prenomcoresponsable'
=>
[
'id'
=>
'prenomcoresponsable'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champPrenomcoresponsable'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'fonctioncoresponsable'
=>
[
'
WebdpoFiche.
fonctioncoresponsable'
=>
[
'id'
=>
'fonctioncoresponsable'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champFonctioncoresponsable'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
...
...
@@ -72,14 +85,20 @@ if (!empty($responsables)) {
<div
class=
"col-md-6"
>
<?php
echo
$this
->
WebcilForm
->
inputs
([
'emailcoresponsable'
=>
[
'
WebdpoFiche.
emailcoresponsable'
=>
[
'id'
=>
'emailcoresponsable'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champEmailcoresponsable'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'telephonecoresponsable'
=>
[
'
WebdpoFiche.
telephonecoresponsable'
=>
[
'id'
=>
'telephonecoresponsable'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champTelephonecoresponsable'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
...
...
@@ -103,20 +122,29 @@ if (!empty($responsables)) {
<div
class=
"col-md-6"
>
<?php
echo
$this
->
WebcilForm
->
inputs
([
'raisonsocialestructure'
=>
[
'
WebdpoFiche.
raisonsocialestructure'
=>
[
'id'
=>
'raisonsocialestructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champRaisonsocialestructure'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'siretstructure'
=>
[
'
WebdpoFiche.
siretstructure'
=>
[
'id'
=>
'siretstructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champSiretstructure'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'apestructure'
=>
[
'
WebdpoFiche.
apestructure'
=>
[
'id'
=>
'apestructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champApestructure'
)
],
'required'
=>
true
,
'readonly'
=>
true
,
'placeholder'
=>
false
...
...
@@ -129,24 +157,36 @@ if (!empty($responsables)) {
<div
class=
"col-md-6"
>
<?php
echo
$this
->
WebcilForm
->
inputs
([
'telephonestructure'
=>
[
'
WebdpoFiche.
telephonestructure'
=>
[
'id'
=>
'telephonestructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champTelephonestructure'
)
],
'readonly'
=>
true
,
'placeholder'
=>
false
],
'faxstructure'
=>
[
'
WebdpoFiche.
faxstructure'
=>
[
'id'
=>
'faxstructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champFaxstructure'
)
],
'readonly'
=>
true
,
'placeholder'
=>
false
],
'adressestructure'
=>
[
'
WebdpoFiche.
adressestructure'
=>
[
'id'
=>
'adressestructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champAdressestructure'
)
],
'type'
=>
'textarea'
,
'readonly'
=>
true
,
'placeholder'
=>
false
],
'emailstructure'
=>
[
'
WebdpoFiche.
emailstructure'
=>
[
'id'
=>
'emailstructure'
,
'label'
=>
[
'text'
=>
__d
(
'fiche'
,
'fiche.champEmailstructure'
)
],
'readonly'
=>
true
,
'placeholder'
=>
false
]
...
...
@@ -164,16 +204,22 @@ if (!empty($responsables)) {
$
(
document
).
ready
(
function
()
{
var
coresponsable
=
$
(
"
#coresponsable
"
).
val
();
$
(
'
#telephonecoresponsable
'
).
mask
(
"
00 00 00 00 00
"
,
{
placeholder
:
"
__ __ __ __ __
"
});
$
(
'
#telephonestructure
'
).
mask
(
"
00 00 00 00 00
"
,
{
placeholder
:
"
__ __ __ __ __
"
});
$
(
'
#faxstructure
'
).
mask
(
"
00 00 00 00 00
"
,
{
placeholder
:
"
__ __ __ __ __
"
});
$
(
'
#siretstructure
'
).
mask
(
"
000 000 000 00000
"
,
{
placeholder
:
"
___ ___ ___ _____
"
});
var
coresponsable
=
$
(
'
#coresponsable
'
).
val
();
displayOngletCoresponsable
(
coresponsable
);
$
(
"
#coresponsable
"
).
change
(
function
()
{
$
(
'
#coresponsable
'
).
change
(
function
()
{
var
idCoresponsable
=
$
(
this
).
val
();
displayOngletCoresponsable
(
idCoresponsable
);
});
var
infoCoresponsable
=
<?php
echo
json_encode
(
Hash
::
combine
(
$responsables
,
'{n}.Responsable.id'
,
'{n}.Responsable'
))
?>
;
$
(
"
#coresponsableid
"
).
change
(
function
()
{
$
(
'
#coresponsableid
'
).
change
(
function
()
{
var
idcoresponsable
=
$
(
this
).
val
();
if
(
idcoresponsable
===
''
)
{
...
...
app/View/Elements/Fiches/oldTabs/ongletSoustraitance.ctp
View file @
31d9d56c
<!-- Onglet sous-traitant -->
<div id="
s
oustraitan
t
" class="tab-pane">
<div id="
ongletS
oustraitan
ce
" class="tab-pane">
<br/>
<!-- Information sur le rédacteur -->
<div class="col-md-12">
...
...
@@ -17,6 +17,9 @@
<?php
echo $this->WebcilForm->input('soustraitantid', [
'id' => 'soustraitantid',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantid')
],
'class' => 'form-control usersDeroulant',
'options' => Hash::combine($soustraitants, '{n}.Soustraitant.id', '{n}.Soustraitant.raisonsociale'),
'empty' => true,
...
...
@@ -31,50 +34,67 @@
<div class="col-md-6">
<?php
echo $this->WebcilForm->inputs([
'soustraitantraisonsociale' => [
'
WebdpoFiche.
soustraitantraisonsociale' => [
'id' => 'soustraitantraisonsociale',
'type' => 'hidden'
],
'soustraitantsiret' => [
'
WebdpoFiche.
soustraitantsiret' => [
'id' => 'soustraitantsiret',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantsiret')
],
'required' => true,
'readonly' => true,
'placeholder' => false
],
'soustraitantape' => [
'
WebdpoFiche.
soustraitantape' => [
'id' => 'soustraitantape',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantape')
],
'required' => true,
'readonly' => true,
'placeholder' => false
],
'soustraitanttelephone' => [
'
WebdpoFiche.
soustraitanttelephone' => [
'id' => 'soustraitanttelephone',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitanttelephone')
],
'readonly' => true,
'placeholder' => false
],
'soustraitantfax' => [
'
WebdpoFiche.
soustraitantfax' => [
'id' => 'soustraitantfax',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantfax')
],
'readonly' => true,
'placeholder' => false
],
'soustraitantadresse' => [
'
WebdpoFiche.
soustraitantadresse' => [
'id' => 'soustraitantadresse',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantadresse')
],
'type' => 'textarea',
'readonly' => true,
'placeholder' => false
],
'soustraitantemail' => [
'
WebdpoFiche.
soustraitantemail' => [
'id' => 'soustraitantemail',
'label' => [
'text' => __d('fiche', 'fiche.champSoustraitantemail')
],
'readonly' => true,
'placeholder' => false
],
'soustraitant' => [
'
WebdpoFiche.
soustraitant' => [
'id' => 'soustraitant',
'type' => 'hidden',
'value' => $soustraitance['Formulaire']['soustraitant']
],
]);
?>
</div>
</div>
...
...
@@ -85,27 +105,31 @@
$(document).ready(function () {
$('#soustraitantsiret').mask("000 000 000 00000", {placeholder: "___ ___ ___ _____"});
$('#soustraitanttelephone').mask("00 00 00 00 00", {placeholder: "__ __ __ __ __"});
$('#soustraitantfax').mask("00 00 00 00 00", {placeholder: "__ __ __ __ __"});
var infoSoustraitant = <?php echo json_encode(Hash::combine($soustraitants, '{n}.Soustraitant.id', '{n}.Soustraitant')); ?>;
$(
"
#soustraitantid
"
).change(function () {
idsoutraitant = $(this).val();
$(
'
#soustraitantid
'
).change(function () {
var
idsoutraitant = $(this).val();
if (idsoutraitant === '') {
str = null;
var
str = null;
$(
"
#soustraitantsiret
"
).val(str);
$(
"
#soustraitantape
"
).val(str);
$(
"
#soustraitanttelephone
"
).val(str);
$(
"
#soustraitantfax
"
).val(str);
$(
"
#soustraitantadresse
"
).val(str);
$(
"
#soustraitantemail
"
).val(str);
$(
'
#soustraitantsiret
'
).val(str);
$(
'
#soustraitantape
'
).val(str);
$(
'
#soustraitanttelephone
'
).val(str);
$(
'
#soustraitantfax
'
).val(str);
$(
'
#soustraitantadresse
'
).val(str);
$(
'
#soustraitantemail
'
).val(str);
} else {
$(
"
#soustraitantraisonsociale
"
).val(infoSoustraitant[idsoutraitant]['raisonsociale']);
$(
"
#soustraitantsiret
"
).val(infoSoustraitant[idsoutraitant]['siret']);
$(
"
#soustraitantape
"
).val(infoSoustraitant[idsoutraitant]['ape']);
$(
"
#soustraitanttelephone
"
).val(infoSoustraitant[idsoutraitant]['telephone']);
$(
"
#soustraitantfax
"
).val(infoSoustraitant[idsoutraitant]['fax']);
$(
"
#soustraitantadresse
"
).val(infoSoustraitant[idsoutraitant]['adresse']);
$(
"
#soustraitantemail
"
).val(infoSoustraitant[idsoutraitant]['email']);
$(
'
#soustraitantraisonsociale
'
).val(infoSoustraitant[idsoutraitant]['raisonsociale']);
$(
'
#soustraitantsiret
'
).val(infoSoustraitant[idsoutraitant]['siret']);
$(
'
#soustraitantape
'
).val(infoSoustraitant[idsoutraitant]['ape']);
$(
'
#soustraitanttelephone
'
).val(infoSoustraitant[idsoutraitant]['telephone']);
$(
'
#soustraitantfax
'
).val(infoSoustraitant[idsoutraitant]['fax']);
$(
'
#soustraitantadresse
'
).val(infoSoustraitant[idsoutraitant]['adresse']);
$(
'
#soustraitantemail
'
).val(infoSoustraitant[idsoutraitant]['email']);
}
});
...
...
app/View/Elements/Fiches/tabs/annexe.ctp
View file @
31d9d56c
...
...
@@ -12,10 +12,12 @@
<br/>
<?php
if ($useAllExtensionFiles['Formulaire']['useallextensionfiles'] === false) {
$extentionsAccepter = __d('fiche', 'fiche.textTypeFichierAccepter');
} else {
$extentionsAccepter = __d('formulaire', 'formulaire.infoExtentionUtilisable');
$extentionsAccepter = __d('fiche', 'fiche.textTypeFichierAccepter');
if ($formulaireOLD['Formulaire']['oldformulaire'] === false) {
if ($useAllExtensionFiles['Formulaire']['useallextensionfiles'] === true) {
$extentionsAccepter = __d('formulaire', 'formulaire.infoExtentionUtilisable');
}
}
?>
...
...
@@ -194,12 +196,9 @@
}
var idFormulaire = <?php echo json_encode($formulaire_id);?>;
// console.log("/fiches/saveFileTmp/"+idFormulaire);
// formData.append('form["toto"][]', idFormulaire);
$.ajax({
url: '/fiches/saveFileTmp/'+idFormulaire,
// url: '/fiches/saveFileTmp/',
method: 'POST',
data: formData,
processData: false,
...
...
app/View/Elements/Fiches/tabs/formulaire.ctp
View file @
31d9d56c
...
...
@@ -43,7 +43,7 @@ $line = 1;
switch
(
$value
[
'Champ'
][
'type'
])
{
// Petit champ texte
case
'input'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'label'
=>
[
'text'
=>
$options
[
'label'
],
...
...
@@ -56,7 +56,7 @@ $line = 1;
// Grand champ texte
case
'textarea'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'label'
=>
[
'text'
=>
$options
[
'label'
],
...
...
@@ -70,7 +70,7 @@ $line = 1;
// Champ date
case
'date'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'label'
=>
[
'text'
=>
$options
[
'label'
],
...
...
@@ -116,7 +116,7 @@ $line = 1;
// Cases à cocher
case
'checkboxes'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'label'
=>
[
'text'
=>
$options
[
'label'
],
...
...
@@ -131,7 +131,7 @@ $line = 1;
// Menu déroulant
case
'deroulant'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'label'
=>
[
'text'
=>
$options
[
'label'
],
...
...
@@ -148,7 +148,7 @@ $line = 1;
// Menu multi-select
case
'multi-select'
:
echo
$this
->
WebcilForm
->
input
(
$options
[
'name'
],
[
echo
$this
->
WebcilForm
->
input
(
'WebdpoFiche.'
.
$options
[
'name'
],
[
'id'
=>
$options
[
'name'
],
'options'
=>
$options
[
'options'
],
'class'
=>
'form-group multiSelect'
,
...
...
@@ -165,7 +165,7 @@ $line = 1;
// Choix unique
case
'radios'
:
$fieldName
=
$options
[
'name'
];
$fieldName
=
'WebdpoFiche.'
.
$options
[
'name'
];
if
(
false
===
strpos
(
$fieldName
,
'.'
))
{
$modelName
=
Inflector
::
classify
(
$this
->
request
->
params
[
'controller'
]);
}
else
{
...
...
app/View/Elements/Fiches/tabs/informationComplementaire.ctp
View file @
31d9d56c
...
...
@@ -38,14 +38,14 @@ if ($this->request->params['action'] === 'show' ) {
<div
class=
"col-md-6"
>
<div
id=
"InputsWrapper"
>
<?php
if
(
isset
(
$this
->
request
->
data
[
'Fiche'
][
'sousFinalite'
]))
{
foreach
(
$this
->
request
->
data
[
'Fiche'
][
'sousFinalite'
]
as
$key
=>
$sousFinalite
)
{
if
(
isset
(
$this
->
request
->
data
[
'
Webdpo
Fiche'
][
'sousFinalite'
]))
{
foreach
(
$this
->
request
->
data
[
'
Webdpo
Fiche'
][
'sousFinalite'
]
as
$key
=>
$sousFinalite
)
{
$idSousFinalite
=
$key
+
1
;
$label
=
'Sous finalité '
.
$idSousFinalite
;
echo
$this
->
WebcilForm
->
input
(
'sousFinalite_'
.
$idSousFinalite
,
[
echo
$this
->
WebcilForm
->
input
(
'
WebdpoFiche.
sousFinalite_'
.
$idSousFinalite
,
[
'id'
=>
'sousFinalite_'
.
$idSousFinalite
,
'value'
=>
$sousFinalite
,
'name'
=>
'data[Fiche][sousFinalite][]'
,
'name'
=>
'data[
Webdpo
Fiche][sousFinalite][]'
,
'label'
=>
[
'text'
=>
$label
,
'class'
=>
'col-md-4 control-label'
...
...
@@ -85,8 +85,11 @@ if ($this->request->params['action'] === 'show' ) {
<!-- Colonne de gauche -->
<div
class=
"col-md-6"
>
<?php
echo
$this
->
WebcilForm
->
input
(
'baselegale'
,
[