Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tourinsoft
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
Tourinsoft
Commits
02586614
Commit
02586614
authored
May 11, 2018
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button delete & contenttype readonly on edit
parent
b01b1076
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
FluxController.php
src/Controller/Backend/FluxController.php
+12
-1
edit.html.twig
templates/Backend/flux/edit.html.twig
+1
-1
list.html.twig
templates/Backend/flux/list.html.twig
+1
-1
No files found.
src/Controller/Backend/FluxController.php
View file @
02586614
...
...
@@ -130,6 +130,16 @@ class FluxController extends BackendBase
/**
* Delete ('/delete/:id')
* @param Request $request
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
public
function
delete
(
$id
)
{}
public
function
delete
(
Request
$request
)
{
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
find
(
$request
->
get
(
'id'
));
$this
->
app
[
'storage'
]
->
delete
(
$flux
);
$this
->
app
[
'session'
]
->
getFlashBag
()
->
add
(
'success'
,
'Flux supprimé'
);
return
$this
->
redirectToRoute
(
'tourinsoft_admin_flux_index'
);
}
}
\ No newline at end of file
templates/Backend/flux/edit.html.twig
View file @
02586614
...
...
@@ -28,7 +28,7 @@
</div>
<div
class=
"col-md-8"
>
{{
form_label
(
form.contentType
)
}}
{{
form_widget
(
form.contentType
)
}}
{{
form_widget
(
form.contentType
,
{
'attr'
:
{
'readonly'
:
'true'
}
}
)
}}
{{
form_errors
(
form.contentType
)
}}
</div>
<!-- sidebar -->
...
...
templates/Backend/flux/list.html.twig
View file @
02586614
...
...
@@ -54,7 +54,7 @@
</a>
</li>
<li>
<a
onclick=
"return confirm('Êtes-vous sûr de vouloir supprimer ce flux?');"
href=
""
>
<a
onclick=
"return confirm('Êtes-vous sûr de vouloir supprimer ce flux?');"
href=
"
{{
path
(
'tourinsoft_admin_flux_delete'
,
{
'id'
:
f.id
}
)
}}
"
>
<i
class=
"fa fa-trash"
></i>
{{
__
(
'general.phrase.delete'
)
}}
</a>
...
...
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