Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-DPO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libriciel
web-DPO
Commits
93acf5c9
Commit
93acf5c9
authored
Nov 27, 2018
by
tguillon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modification : selection du changement d'entité via une modal lorsqu'il y a plus de 5 entités
parent
7836f6e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
6 deletions
+80
-6
app/Controller/OrganisationsController.php
app/Controller/OrganisationsController.php
+4
-0
app/View/Layouts/default.ctp
app/View/Layouts/default.ctp
+76
-6
No files found.
app/Controller/OrganisationsController.php
View file @
93acf5c9
...
...
@@ -515,6 +515,10 @@ class OrganisationsController extends AppController {
* @version V1.0.0
*/
public
function
change
(
$id
=
null
,
$redirect
=
0
,
$controller
=
null
,
$action
=
null
)
{
if
(
isset
(
$this
->
request
->
data
[
'Organisation'
][
'organisationcible'
]))
{
$id
=
$this
->
request
->
data
[
'Organisation'
][
'organisationcible'
];
}
if
(
$id
===
'null'
)
{
$id
=
trim
((
string
)
Hash
::
get
(
$this
->
request
->
data
,
'Organisation.organisationcible'
));
$id
=
$id
===
''
?
null
:
$id
;
...
...
app/View/Layouts/default.ctp
View file @
93acf5c9
...
...
@@ -410,13 +410,23 @@
]
];
foreach ($organisations as $datas) {
$mesEntites[$datas['Organisation']['raisonsociale']] = [
if (count($organisations) <= 5) {
foreach ($organisations as $datas) {
$mesEntites[$datas['Organisation']['raisonsociale']] = [
'url' => [
'controller' => 'organisations',
'action' => 'change',
$datas['Organisation']['id']
]
];
}
} else {
$mesEntites[__d('pannel', 'pannel.champOrganisationcible')] = [
'url' => [
'
controller' => 'organisations',
'action' => 'change'
,
$datas['Organisation']['id']
]
'
#' => '#'
]
,
'data-toggle' => 'modal',
'data-target' => '#modalChangeEntite'
];
}
...
...
@@ -723,6 +733,66 @@
</div>
</div>
</div>
<!--Pop-up pour administrer une entité-->
<div
class=
"modal fade"
id=
"modalChangeEntite"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
<?php echo __d('pannel', 'pannel.popupAdministrerEntite'); ?>
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"row form-group"
>
<?php
echo $this->Form->create('Organisation', [
'url' => [
'controller' => 'organisations',
'action' => 'change'
]
]);
echo $this->WebcilForm->input('Organisation.organisationcible', [
'id' => 'organisationcible',
'options' => $listeOrganisations,
'class' => 'usersDeroulant transformSelect form-control',
'required' => true,
'empty' => true,
'data-placeholder' => ' '
]);
?>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default-default"
data-dismiss=
"modal"
>
<i
class=
"fa fa-times-circle fa-lg"
>
<!---->
</i>
<?php echo __d('default', 'default.btnAnnuler'); ?>
</button>
<?php
echo $this->Form->button("<i class='fa fa-wrench fa-lg'> </i>" . __d('organisation', 'organisation.btnAdministrerEntite'), [
'type' => 'submit',
'class' => 'btn btn-default-success',
'escape' => false
]);
?>
</div>
<?php
echo $this->Form->end();
?>
</div>
</div>
</div>
</div>
<div
id=
"footer"
class=
"container-fluid-custom"
>
<div
class=
"text-center versioning"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment