-
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.
- Loading branch information
Showing
18 changed files
with
679 additions
and
168 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
<?php | ||
|
||
namespace App\Form; | ||
|
||
use App\Entity\Address; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class AddressType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options): void | ||
{ | ||
$builder | ||
->add('address_text') | ||
->add('address2') | ||
->add('address3') | ||
->add('district') | ||
->add('location') | ||
->add('state') | ||
->add('country') | ||
->add('city') | ||
->add('postal_code') | ||
->add('createdAt') | ||
->add('updatedAt') | ||
; | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver->setDefaults([ | ||
'data_class' => Address::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace App\Form; | ||
|
||
use App\Entity\SiteParams; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class SiteParamsType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options): void | ||
{ | ||
$builder | ||
->add('url') | ||
->add('name') | ||
->add('email_contact') | ||
->add('title') | ||
->add('description') | ||
->add('image') | ||
->add('type') | ||
->add('author') | ||
; | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver->setDefaults([ | ||
'data_class' => SiteParams::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<form method="post" action="{{ path('app_address_delete', {'id': address.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> | ||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ address.id) }}"> | ||
<button class="btn">Delete</button> | ||
</form> |
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,4 @@ | ||
{{ form_start(form) }} | ||
{{ form_widget(form) }} | ||
<button class="btn">{{ button_label|default('Save') }}</button> | ||
{{ form_end(form) }} |
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,13 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}Edit Address{% endblock %} | ||
|
||
{% block body %} | ||
<h1>Edit Address</h1> | ||
|
||
{{ include('address/_form.html.twig', {'button_label': 'Update'}) }} | ||
|
||
<a href="{{ path('app_address_index') }}">back to list</a> | ||
|
||
{{ include('address/_delete_form.html.twig') }} | ||
{% endblock %} |
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,55 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}Address index{% endblock %} | ||
|
||
{% block body %} | ||
<h1>Address index</h1> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Id</th> | ||
<th>Address_text</th> | ||
<th>Address2</th> | ||
<th>Address3</th> | ||
<th>District</th> | ||
<th>Location</th> | ||
<th>State</th> | ||
<th>Country</th> | ||
<th>City</th> | ||
<th>Postal_code</th> | ||
<th>CreatedAt</th> | ||
<th>UpdatedAt</th> | ||
<th>actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for address in addresses %} | ||
<tr> | ||
<td>{{ address.id }}</td> | ||
<td>{{ address.addressText }}</td> | ||
<td>{{ address.address2 }}</td> | ||
<td>{{ address.address3 }}</td> | ||
<td>{{ address.district }}</td> | ||
<td>{{ address.location }}</td> | ||
<td>{{ address.state }}</td> | ||
<td>{{ address.country }}</td> | ||
<td>{{ address.city }}</td> | ||
<td>{{ address.postalCode }}</td> | ||
<td>{{ address.createdAt ? address.createdAt|date('Y-m-d H:i:s') : '' }}</td> | ||
<td>{{ address.updatedAt ? address.updatedAt|date('Y-m-d H:i:s') : '' }}</td> | ||
<td> | ||
<a href="{{ path('app_address_show', {'id': address.id}) }}">show</a> | ||
<a href="{{ path('app_address_edit', {'id': address.id}) }}">edit</a> | ||
</td> | ||
</tr> | ||
{% else %} | ||
<tr> | ||
<td colspan="13">no records found</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
<a href="{{ path('app_address_new') }}">Create new</a> | ||
{% endblock %} |
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,11 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}New Address{% endblock %} | ||
|
||
{% block body %} | ||
<h1>Create new Address</h1> | ||
|
||
{{ include('address/_form.html.twig') }} | ||
|
||
<a href="{{ path('app_address_index') }}">back to list</a> | ||
{% endblock %} |
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,66 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}Address{% endblock %} | ||
|
||
{% block body %} | ||
<h1>Address</h1> | ||
|
||
<table class="table"> | ||
<tbody> | ||
<tr> | ||
<th>Id</th> | ||
<td>{{ address.id }}</td> | ||
</tr> | ||
<tr> | ||
<th>Address_text</th> | ||
<td>{{ address.addressText }}</td> | ||
</tr> | ||
<tr> | ||
<th>Address2</th> | ||
<td>{{ address.address2 }}</td> | ||
</tr> | ||
<tr> | ||
<th>Address3</th> | ||
<td>{{ address.address3 }}</td> | ||
</tr> | ||
<tr> | ||
<th>District</th> | ||
<td>{{ address.district }}</td> | ||
</tr> | ||
<tr> | ||
<th>Location</th> | ||
<td>{{ address.location }}</td> | ||
</tr> | ||
<tr> | ||
<th>State</th> | ||
<td>{{ address.state }}</td> | ||
</tr> | ||
<tr> | ||
<th>Country</th> | ||
<td>{{ address.country }}</td> | ||
</tr> | ||
<tr> | ||
<th>City</th> | ||
<td>{{ address.city }}</td> | ||
</tr> | ||
<tr> | ||
<th>Postal_code</th> | ||
<td>{{ address.postalCode }}</td> | ||
</tr> | ||
<tr> | ||
<th>CreatedAt</th> | ||
<td>{{ address.createdAt ? address.createdAt|date('Y-m-d H:i:s') : '' }}</td> | ||
</tr> | ||
<tr> | ||
<th>UpdatedAt</th> | ||
<td>{{ address.updatedAt ? address.updatedAt|date('Y-m-d H:i:s') : '' }}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<a href="{{ path('app_address_index') }}">back to list</a> | ||
|
||
<a href="{{ path('app_address_edit', {'id': address.id}) }}">edit</a> | ||
|
||
{{ include('address/_delete_form.html.twig') }} | ||
{% endblock %} |
Oops, something went wrong.