mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-26 03:56:13 +00:00
83 lines
4.4 KiB
Twig
83 lines
4.4 KiB
Twig
{{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}
|
|
{{ form_errors(form) }}
|
|
{{ form_row(form.kind) }}
|
|
<div id="linked-entity">
|
|
<fieldset class="mb-3">
|
|
<div class="row">
|
|
<legend class="col-sm-4 col-form-label">Associer un</legend>
|
|
<div class="col-sm-8">
|
|
<div id="entity-selector">
|
|
<div class="form-check">
|
|
{% if resource is defined and resource.person is not null %}
|
|
<input checked type="radio" id="chill_personbundle_person_resource_linkedEntity_0" name="linked-entity" class="form-check-input" value="person" {% if form.vars.submitted and app.request.request.get('linked-entity', null) == 'person' %}checked{% endif %}/>
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_0">Usager</label>
|
|
{% else %}
|
|
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_0" name="linked-entity" class="form-check-input" value="person" />
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_0">Usager</label>
|
|
{% endif %}
|
|
</div>
|
|
<div class="form-check">
|
|
{% if resource is defined and resource.thirdparty is not null %}
|
|
<input checked type="radio" id="chill_personbundle_person_resource_linkedEntity_1" name="linked-entity" class="form-check-input" value="thirdparty" {% if form.vars.submitted and app.request.request.get('linked-entity', null) == 'thirdparty' %}checked{% endif %}/>
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_1">Tiers</label>
|
|
{% else %}
|
|
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_1" name="linked-entity" class="form-check-input" value="thirdparty" />
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_1">Tiers</label>
|
|
{% endif %}
|
|
</div>
|
|
<div class="form-check">
|
|
{% if resource is defined and resource.freeText is not null %}
|
|
<input checked type="radio" id="chill_personbundle_person_resource_linkedEntity_2" name="linked-entity" class="form-check-input" value="freetext" {% if form.vars.submitted and app.request.request.get('linked-entity', null) == 'thirdparty' %}checked{% endif %}/>
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_2">Description libre</label>
|
|
{% else %}
|
|
<input type="radio" id="chill_personbundle_person_resource_linkedEntity_2" name="linked-entity" class="form-check-input" value="freetext" />
|
|
<label class="form-check-label" for="chill_personbundle_person_resource_linkedEntity_2">Description libre</label>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
|
|
<div id="person-entity">
|
|
{{ form_row(form.person) }}
|
|
</div>
|
|
<div id="thirdparty-entity">
|
|
{{ form_row(form.thirdparty) }}
|
|
</div>
|
|
<div id="freetext-entity">
|
|
{{ form_row(form.freetext) }}
|
|
</div>
|
|
|
|
|
|
{{ form_row(form.comment) }}
|
|
|
|
{% if action is defined %}
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel">
|
|
<a href="{{ path('chill_person_resource_list', { 'person_id': resource.personOwner.id } ) }}" class="btn btn-cancel">
|
|
{{ 'Cancel'|trans }}
|
|
</a>
|
|
</li>
|
|
<li class="edit">
|
|
<button class="btn btn-edit"
|
|
type="submit" id="newPersonResource">
|
|
{{ 'edit resource'|trans|capitalize }}
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
{% else %}
|
|
<ul class="record_actions">
|
|
<li>
|
|
<button class="btn btn-create"
|
|
type="submit" id="newPersonResource">
|
|
{{ 'Save'|trans }}
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{{ form_end(form) }}
|