Creation of PersonResource

This commit is contained in:
2022-01-26 12:52:15 +00:00
committed by Julien Fastré
parent 7513187a6d
commit 88d1fe24b4
40 changed files with 1426 additions and 39 deletions

View File

@@ -0,0 +1,78 @@
{{ form_start(form, {'attr' : {'id' : 'create-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" />
<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" />
<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" />
<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="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) }}