Commit 9acf6260 authored by THEO GUILLON's avatar THEO GUILLON
Browse files

Merge branch '641-pb-ajout-norme' into '2.1.3'

Resolve "Pb ajout norme"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!675
parents 98b98817 dec64739
Pipeline #22304 passed with stage
in 1 minute and 52 seconds
<?php
$breadcrumbs = [
__d('norme', 'norme.titreListeNorme') => [
'action' => 'index',
'prepend' => true
],
$title => []
];
$this->Breadcrumbs->breadcrumbs($breadcrumbs, true);
if (isset($this->validationErrors['Norme']) && !empty($this->validationErrors['Norme'])) {
?>
<div class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"><!----></span>
<span class="sr-only">Error:</span>
Ces erreurs se sont produites:
<ul>
<?php
foreach ($this->validationErrors as $donnees) {
foreach ($donnees as $champ) {
foreach ($champ as $error) {
echo '<li>' . $error . '</li>';
}
}
}
?>
</ul>
</div>
<?php
}
echo $this->WebcilForm->create('Norme',[
'autocomplete' => 'off',
'inputDefaults' => ['div' => false],
'class' => 'form-horizontal',
'novalidate' => 'novalidate',
'type' => 'file'
]);
?>
<div class="row col-md-12">
<div class="col-md-6">
<?php
echo $this->WebcilForm->input('norme', [
'id' => 'norme',
'options' => $options['Norme']['norme'],
'class' => 'form-control custom-select',
'empty' => true,
'required' => true,
'placeholder' => false
]);
?>
</div>
<div class="col-md-1 text-center">
<i style="margin-left:10px; margin-top: 30px" class="fa fa-arrow-right pull-left"></i>
</div>
<div class="col-md-5">
<?php
echo $this->WebcilForm->input('prefixNumero', [
'id' => 'prefixNumero',
'label' => [
'text' => false,
'class' => false
],
'readonly' => true,
'placeholder' => false
]);
?>
</div>
</div>
<div class="row col-md-12">
<div class="col-md-6">
<?php
echo $this->WebcilForm->inputs([
'numero' => [
'id' => 'numero',
'type' => 'text',
'required' => true,
'maxlength' => 3
],
'libelle' => [
'id' => 'libelle',
'required' => true
],
'description' => [
'id' => 'description',
'type' => 'textarea'
]
]);
// Ajouter le PDF de la norme
echo $this->WebcilForm->input('Norme.fichier', [
'id' => 'logo_file',
'type' => 'file',
'class' => 'filestyle',
'data-text' => ' Ajouter le PDF de la norme',
'data-buttonBefore' => 'true',
'accept' => 'application/pdf',
'label' => [
'text' => false
]
]);
?>
</div>
</div>
<?php
echo $this->WebcilForm->buttons(['Cancel', 'Save']);
echo $this->WebcilForm->end();
?>
<script type="text/javascript">
$(document).ready(function () {
$('#numero').mask("000", {
placeholder: "___"
});
let prefixNorme = "",
numeroNorme = "",
libelleNorme = "";
// Lors d'action sur le menu déroulant
$('#norme').change(function () {
prefixNorme = $(this).val();
$('#prefixNumero').val(prefixNorme + numeroNorme + libelleNorme);
});
$('#numero').change(function () {
if ($(this).val() === '') {
numeroNorme = "";
} else {
numeroNorme = '-' + $(this).val();
}
$('#prefixNumero').val(prefixNorme + numeroNorme + libelleNorme);
});
$('#libelle').change(function () {
if ($(this).val() === '') {
libelleNorme = "";
} else {
libelleNorme = ' : ' + $(this).val();
}
$('#prefixNumero').val(prefixNorme + numeroNorme + libelleNorme);
});
});
</script>
......@@ -13,40 +13,40 @@
}
},
"@fortawesome/fontawesome-common-types": {
"version": "0.2.35",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz",
"integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw=="
"version": "0.2.36",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz",
"integrity": "sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg=="
},
"@fortawesome/fontawesome-svg-core": {
"version": "1.2.35",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.35.tgz",
"integrity": "sha512-uLEXifXIL7hnh2sNZQrIJWNol7cTVIzwI+4qcBIq9QWaZqUblm0IDrtSqbNg+3SQf8SMGHkiSigD++rHmCHjBg==",
"version": "1.2.36",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.36.tgz",
"integrity": "sha512-YUcsLQKYb6DmaJjIHdDWpBIGCcyE/W+p/LMGvjQem55Mm2XWVAP5kWTMKWLv9lwpCVjpLxPyOMOyUocP1GxrtA==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
"@fortawesome/fontawesome-common-types": "^0.2.36"
}
},
"@fortawesome/free-brands-svg-icons": {
"version": "5.15.3",
"resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.15.3.tgz",
"integrity": "sha512-1hirPcbjj72ZJtFvdnXGPbAbpn3Ox6mH3g5STbANFp3vGSiE5u5ingAKV06mK6ZVqNYxUPlh4DlTnaIvLtF2kw==",
"version": "5.15.4",
"resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.15.4.tgz",
"integrity": "sha512-f1witbwycL9cTENJegcmcZRYyawAFbm8+c6IirLmwbbpqz46wyjbQYLuxOc7weXFXfB7QR8/Vd2u5R3q6JYD9g==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
"@fortawesome/fontawesome-common-types": "^0.2.36"
}
},
"@fortawesome/free-regular-svg-icons": {
"version": "5.15.3",
"resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.3.tgz",
"integrity": "sha512-q4/p8Xehy9qiVTdDWHL4Z+o5PCLRChePGZRTXkl+/Z7erDVL8VcZUuqzJjs6gUz6czss4VIPBRdCz6wP37/zMQ==",
"version": "5.15.4",
"resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz",
"integrity": "sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
"@fortawesome/fontawesome-common-types": "^0.2.36"
}
},
"@fortawesome/free-solid-svg-icons": {
"version": "5.15.3",
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.3.tgz",
"integrity": "sha512-XPeeu1IlGYqz4VWGRAT5ukNMd4VHUEEJ7ysZ7pSSgaEtNvSo+FLurybGJVmiqkQdK50OkSja2bfZXOeyMGRD8Q==",
"version": "5.15.4",
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.4.tgz",
"integrity": "sha512-JLmQfz6tdtwxoihXLg6lT78BorrFyCf59SAwBM6qV/0zXyVeDygJVb3fk+j5Qat+Yvcxp1buLTY5iDh1ZSAQ8w==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
"@fortawesome/fontawesome-common-types": "^0.2.36"
}
},
"@libriciel/ls-bootstrap-4": {
......@@ -86,9 +86,9 @@
}
},
"@popperjs/core": {
"version": "2.10.2",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.10.2.tgz",
"integrity": "sha512-IXf3XA7+XyN7CP9gGh/XB0UxVMlvARGEgGXLubFICsUMGz6Q+DU+i4gGlpOxTjKvXjkJDJC8YdqdKkDj9qZHEQ=="
"version": "2.11.2",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
"integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA=="
},
"bootstrap": {
"version": "4.6.1",
......@@ -111,17 +111,20 @@
"integrity": "sha512-reywdHlYEkPbzWjTpcc1fk9XQ3PLvO5dzEAVqy8zI7NTF22tB1HbeU3iboZTLdkBEPaWAqeI2HtEjsGQ4roZKw=="
},
"jquery-ui": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.0.tgz",
"integrity": "sha512-Osf7ECXNTYHtKBkn9xzbIf9kifNrBhfywFEKxOeB/OVctVmLlouV9mfc2qXCp6uyO4Pn72PXKOnj09qXetopCw==",
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.1.tgz",
"integrity": "sha512-2VlU59N5P4HaumDK1Z3XEVjSvegFbEOQRgpHUBaB2Ak98Axl3hFhJ6RFcNQNuk9SfL6WxIbuLst8dW/U56NSiA==",
"requires": {
"jquery": ">=1.8.0 <4.0.0"
}
},
"jquery-ui-dist": {
"version": "1.12.1",
"resolved": "https://registry.npmjs.org/jquery-ui-dist/-/jquery-ui-dist-1.12.1.tgz",
"integrity": "sha1-XAgV08xvkP9fqvWyaKbiO0ypBPo="
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/jquery-ui-dist/-/jquery-ui-dist-1.13.0.tgz",
"integrity": "sha512-fgpGOW098swRvTLglH3RLyAjW/8Ecxd35fO7Z1WtBidhZgnPDvTJzZ+XFybAFzv3zZiEESI8TkK6oYXbzu/rKw==",
"requires": {
"jquery": ">=1.8.0 <4.0.0"
}
},
"popper.js": {
"version": "1.16.1",
......@@ -134,9 +137,9 @@
"integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw=="
},
"tinymce": {
"version": "5.10.0",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.10.0.tgz",
"integrity": "sha512-SaqBK8GtTKYSsTfhKdN0+NrZRgmVWO+j3fvgzLjt0t/g0osNzRH5os8icm2Rv5HvaeTd4TpxetUuLE+R9yg/yg=="
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-5.10.2.tgz",
"integrity": "sha512-5QhnZ6c8F28fYucLLc00MM37fZoAZ4g7QCYzwIl38i5TwJR5xGqzOv6YMideyLM4tytCzLCRwJoQen2LI66p5A=="
},
"tinymce-i18n": {
"version": "20.12.25",
......@@ -144,9 +147,9 @@
"integrity": "sha512-MOVCgGbkZ2ZVvb9B38Mbdhwam1oZOBXDkxmzcHX3W7c3RCB8r4VG9DS8+4BcsoCCgfUg1JXwh2Hk+7aXcYXkkg=="
},
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}
}
}
......@@ -10,15 +10,15 @@
"dependencies": {
"@libriciel/ls-bootstrap-4": "0.0.187552",
"@libriciel/ls-composants": "10.5.0",
"@popperjs/core": "^2.10.2",
"@popperjs/core": "^2.11.2",
"bootstrap": "^4.6.1",
"components-font-awesome": "^5.9.0",
"jquery": "^3.5.1",
"jquery-mask-plugin": "^1.14.16",
"jquery-ui": "^1.13.0",
"jquery-ui-dist": "^1.12.1",
"jquery-ui": "^1.13.1",
"jquery-ui-dist": "^1.13.0",
"select2": "^4.0.13",
"tinymce": "^5.10.0",
"tinymce": "^5.10.2",
"tinymce-i18n": "^20.4.4"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment