Skip to content

Commit

Permalink
fix event group form
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerrialn committed Jan 11, 2024
1 parent ce175c4 commit e4baa65
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 55 deletions.
1 change: 1 addition & 0 deletions src/Form/Form/EventGroupFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
],
])
->add('isPrivate', CheckboxType::class, [
'required' => false,
'label' => $this->translator->trans('is-private-group-input-label'),
'label_attr' => [
'class' => 'checkbox-switch',
Expand Down
104 changes: 51 additions & 53 deletions templates/events/settings.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,69 +29,67 @@
{{ include('partials/_event_settings_nav.html.twig') }}
</div>
<div class="col-12 col-md-8">
{% if not event.isPublished and not event.isComplete %}
{{ form_start(eventForm) }}
<div class="card mb-3">
<div class="card-header">
{{ form_label(eventForm.eventGroup) }}
</div>
{{ form_widget(eventForm.eventGroup) }}
{{ form_start(eventForm) }}
<div class="card mb-3">
<div class="card-header">
{{ form_label(eventForm.eventGroup) }}
</div>
<div class="card mb-3">
<div class="" {{ stimulus_controller('location', {
token: mapbox_token,
latitude: event.latitude,
longitude: event.longitude
}) }}>
<div class="map" id="map" {{ stimulus_target('location', 'result') }} ></div>
{{ form_row(eventForm.latitude) }}
{{ form_row(eventForm.longitude) }}
<div class="card-body">
<a class="btn btn-secondary" {{ stimulus_action('location', 'getCurrentLocation', 'click') }}>
<div class="d-flex align-items-center justify-content-between">
<span class="me-2">{{ 'current-location'|trans }}</span>
<span {{ stimulus_target('location', 'icon') }} class="bi bi-crosshair"></span>
</div>
</a>
</div>
{{ form_widget(eventForm.eventGroup) }}
</div>
<div class="card mb-3">
<div class="" {{ stimulus_controller('location', {
token: mapbox_token,
latitude: event.latitude,
longitude: event.longitude
}) }}>
<div class="map" id="map" {{ stimulus_target('location', 'result') }} ></div>
{{ form_row(eventForm.latitude) }}
{{ form_row(eventForm.longitude) }}
<div class="card-body">
<a class="btn btn-secondary" {{ stimulus_action('location', 'getCurrentLocation', 'click') }}>
<div class="d-flex align-items-center justify-content-between">
<span class="me-2">{{ 'current-location'|trans }}</span>
<span {{ stimulus_target('location', 'icon') }} class="bi bi-crosshair"></span>
</div>
</a>
</div>
</div>

<div class="list-group list-group-flush">
<div class="list-group-item"> {{ form_row(eventForm.address) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.title) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.image) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.description) }}</div>
<div class="list-group-item">
<div class="row">
<div class="col-6">
{{ form_row(eventForm.startAt) }}
</div>
<div class="col-6">
{{ form_row(eventForm.endAt) }}
</div>
<div class="list-group list-group-flush">
<div class="list-group-item"> {{ form_row(eventForm.address) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.title) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.image) }}</div>
<div class="list-group-item"> {{ form_row(eventForm.description) }}</div>
<div class="list-group-item">
<div class="row">
<div class="col-6">
{{ form_row(eventForm.startAt) }}
</div>
<div class="col-6">
{{ form_row(eventForm.endAt) }}
</div>
</div>
<div class="list-group-item d-flex justify-content-between"> {{ form_row(eventForm.isPrivate) }}</div>
<div class="list-group-item">
{{ 'event-term-and-condition'|trans({
path: path('create_index')
})|raw }}
</div>
</div>
<div class="card-footer">
<div class="text-end">
<button type="submit" class="btn btn-primary">{{ 'create'|trans }}</button>
</div>
<div class="list-group-item d-flex justify-content-between"> {{ form_row(eventForm.isPrivate) }}</div>
<div class="list-group-item">
{{ 'event-term-and-condition'|trans({
path: path('create_index')
})|raw }}
</div>
</div>
<div class="card mb-3">
<div class="card-header">
{{ form_label(eventForm.categories) }}
<div class="card-footer">
<div class="text-end">
<button type="submit" class="btn btn-primary">{{ 'create'|trans }}</button>
</div>
{{ form_widget(eventForm.categories) }}
</div>
{{ form_end(eventForm) }}
{% endif %}
</div>
<div class="card mb-3">
<div class="card-header">
{{ form_label(eventForm.categories) }}
</div>
{{ form_widget(eventForm.categories) }}
</div>
{{ form_end(eventForm) }}
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/partials/_navbar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{% if app.user %}
<div class="list-group list-group-horizontal list-group-flush border-0">
<a href="{{ path('user_account') }}"
class="list-group-item list-group-item-action d-flex justify-content-start align-items-center">
class="list-group-item d-flex justify-content-start align-items-center">
<div class="me-3">
<img src="{{ app.user.avatar }}" height="50" class="border rounded-circle"/>
</div>
Expand All @@ -47,7 +47,7 @@
<div> {{ app.user.email }}</div>
</div>
</a>
<a class="list-group-item w-25 border-top-0 border-bottom list-group-item-action text-center"
<a class="list-group-item w-25 border-top-0 border-bottom text-center"
data-bs-dismiss="offcanvas"
aria-label="Close">
<span class="bi bi-x-lg fs-4"></span>
Expand Down

0 comments on commit e4baa65

Please sign in to comment.