-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:(UpdateMedias-#49): Update medias
- Loading branch information
Gael
committed
Mar 20, 2023
1 parent
649a61f
commit 644a978
Showing
20 changed files
with
213 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
public/assets/js/newMedia.js → public/assets/js/updateImage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('updateVideo.js loaded'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace App\Form; | ||
|
||
use App\Entity\TrickVideo; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class TrickVideoFormType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options): void | ||
{ | ||
$builder | ||
->add('newVideo', TextType::class, [ | ||
'label' => 'Vidéo', | ||
'help' => 'Lien de la vidéo (Youtube, Dailymotion, Vimeo)', | ||
'required' => true, | ||
'mapped' => false, | ||
'attr' => [ | ||
'class' => 'form-control' | ||
] | ||
]) | ||
->add('oldVideo', HiddenType::class, [ | ||
'mapped' => false, | ||
'attr' => [ | ||
'readonly' => true | ||
], | ||
]) | ||
->add('trickId', HiddenType::class, [ | ||
'mapped' => false, | ||
'attr' => [ | ||
'readonly' => true | ||
], | ||
]); | ||
; | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver->setDefaults([ | ||
'data_class' => TrickVideo::class, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div id="confirm-modal-update-image"> | ||
<div class="modal-content"> | ||
<h5 class="modal-title">Modifier une image</h5> | ||
<div class="mt-2"> | ||
<img id="modal-image" height="250" class="card-img-top" src=""> | ||
</div> | ||
<p id="confirm-message-update"></p> | ||
{{ form_start(trickImageForm) }} | ||
{{ form_row(trickImageForm.newImage) }} | ||
<div class="d-flex flex-row justify-content-center"> | ||
<button id="confirm-yes-update-image" type="submit" class="confirm-modal-validate mx-2">Modifier</button> | ||
<button id="confirm-no-update-image" type="button" class="btn confirm-modal-cancel mx-2">Annuler</button> | ||
</div> | ||
{{ form_end(trickImageForm) }} | ||
</div> | ||
</div> |
Oops, something went wrong.