Fixes
All checks were successful
Gitea Actions / Run-Tests-On-Arm64 (push) Successful in 5m37s
Gitea Actions / Run-Tests-On-Amd64 (push) Successful in 28m22s

This commit is contained in:
Thomas Peterson 2025-03-18 08:32:01 +01:00
parent 0a34cdefb7
commit fdd0d452c4
5 changed files with 35 additions and 4 deletions

View File

@ -0,0 +1,19 @@
import { Controller } from '@hotwired/stimulus';
import { Datepicker } from 'flowbite-datepicker';
/* stimulusFetch: 'lazy' */
export default class extends Controller {
datepicker;
connect() {
this.element.type = 'text';
this.datepicker = new Datepicker(this.element, {
format: 'yyyy-mm-dd',
autohide: true,
});
}
disconnect() {
if (this.datepicker) {
this.datepicker.destroy();
}
this.element.type = 'date';
}
}

View File

@ -3,12 +3,12 @@ import Alpine from 'alpinejs';
import persist from '@alpinejs/persist'
import $ from 'jquery'
window.$ = window.jQuery = $;
import { startStimulusApp } from '@symfony/stimulus-bundle';
const app = startStimulusApp();
import { initTabs } from 'david-ai';
// Initialize tabs functionality
initTabs();
import { startStimulusApp } from '@symfony/stimulus-bundle';
const app = startStimulusApp();
Alpine.plugin(persist)
Alpine.store('theme', {

View File

@ -324,4 +324,14 @@ return [
'version' => '2.4.3',
'type' => 'css',
],
'flowbite' => [
'version' => '3.1.2',
],
'flowbite-datepicker' => [
'version' => '1.3.2',
],
'flowbite/dist/flowbite.min.css' => [
'version' => '3.1.2',
'type' => 'css',
],
];

View File

@ -118,7 +118,6 @@ class EditController extends AbstractController
/** @var News $news */
$news = $entityManager
->getRepository('PSC\Shop\NewsBundle\Entity\News')->findOneBy(array('uid' => $uid, 'shop' => $selectedShop));
dump($news);
$form = $this->createForm(NewsType::class, $news);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {

View File

@ -46,7 +46,10 @@ class NewsType extends AbstractType
->add('enable', CheckboxType::class, ['label' => 'active', 'required' => false])
->add('sortDate', DateType::class, ['label' => 'Sortdate', 'required' => false])
->add('toDate', DateTimeType::class, ['label' => 'toDate', 'required' => false])
->add('fromDate', DateTimeType::class, ['label' => 'fromDate', 'required' => false])
->add('fromDate', DateTimeType::class, ['label' => 'fromDate', 'required' => false,
'widget' => 'single_text',
'attr' => [
]])
->add('url', TextType::class, ['label' => 'Url', 'required' => false])
->add('introduction', TextareaType::class, ['label' => 'Introduction', 'required' => false])
->add('language', ChoiceType::class, [