mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
various improvements on 3party
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
|
||||
|
||||
|
||||
{% if form.civility is defined %}
|
||||
{{ form_row(form.civility) }}
|
||||
{% endif %}
|
||||
@@ -19,6 +22,9 @@
|
||||
{{ form_row(form.telephone) }}
|
||||
{{ form_row(form.email) }}
|
||||
|
||||
<h2>{{ 'Contacts'|trans }}</h2>
|
||||
{{ form_widget(form.children) }}
|
||||
|
||||
<div class="mb-3 row">
|
||||
{{ form_label(form.address) }}
|
||||
{{ form_widget(form.address) }}
|
||||
|
35
src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig
vendored
Normal file
35
src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
{% block _third_party_children_entry_widget %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-3 mb-3">
|
||||
{{ form_widget(form.civility) }}
|
||||
{{ form_errors(form.civility) }}
|
||||
{{ form_label(form.civility) }}
|
||||
</div>
|
||||
<div class="form-group col-md-5 mb-3">
|
||||
{{ form_widget(form.name) }}
|
||||
{{ form_errors(form.name) }}
|
||||
{{ form_label(form.name) }}
|
||||
</div>
|
||||
<div class="form-group col-md-4 mb-3">
|
||||
{{ form_widget(form.profession) }}
|
||||
{{ form_errors(form.profession) }}
|
||||
{{ form_label(form.profession) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 mb-3">
|
||||
{{ form_widget(form.telephone) }}
|
||||
{{ form_errors(form.telephone) }}
|
||||
{{ form_label(form.telephone) }}
|
||||
</div>
|
||||
<div class="form-group col-md-6 mb-3">
|
||||
{{ form_widget(form.email) }}
|
||||
{{ form_errors(form.email) }}
|
||||
{{ form_label(form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -57,7 +57,10 @@
|
||||
{% for tp in third_parties %}
|
||||
<tr>
|
||||
<th>{{ (tp.active ? '<i class="fa fa-check chill-green">' : '<i class="fa fa-times chill-red">')|raw }}</th>
|
||||
<td>{{ tp.name }}</td>
|
||||
<td>
|
||||
{{ tp.name }}
|
||||
{% if tp.isChild %}<span class="badge bg-info">{{ 'Contact'|trans }}</span>{% endif %}
|
||||
</td>
|
||||
{% set types = [] %}
|
||||
{% for t in tp.types %}
|
||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||
@@ -77,12 +80,14 @@
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_edit', { 'id': tp.id }) }}" class="btn btn-sm btn-update"></a>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_edit',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-update"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view', { 'id': tp.id }) }}" class="btn btn-sm btn-show"></a>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view',
|
||||
{ 'id': (tp.isParent ? tp.id : tp.parent.id) }) }}" class="btn btn-sm btn-show"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% set thirdParty = entity %}
|
||||
{% form_theme form '@ChillThirdParty/ThirdParty/_form_thirdparty_children.html.twig' %}
|
||||
|
||||
{% block title 'Create third party'|trans %}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% set thirdParty = entity %}
|
||||
{% form_theme form '@ChillThirdParty/ThirdParty/_form_thirdparty_children.html.twig' %}
|
||||
|
||||
{% block title 'Update third party %name%'|trans({ '%name%': thirdParty.name }) %}
|
||||
|
||||
|
Reference in New Issue
Block a user