person: create a person with address (php form)

This commit is contained in:
nobohan
2022-04-19 14:56:41 +02:00
parent 84038c0ff2
commit 4bc8da9655
6 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { ShowHide } from 'ShowHide';
const addressForm = document.getElementById("addressForm");
const address = document.getElementById("address");
new ShowHide({
froms: [addressForm],
container: [address],
test: function(froms) {
for (let f of froms.values()) {
for (let input of f.querySelectorAll('input').values()) {
return input.checked;
}
}
return false;
},
event_name: 'change'
});

View File

@@ -107,6 +107,13 @@
{{ form_row(form.center) }}
{% endif %}
<div id=addressForm>
{{ form_row(form.addressForm) }}
</div>
<div id=address>
{{ form_row(form.address) }}
</div>
<ul class="record_actions sticky-form-buttons">
<li class="dropdown">
<a class="btn btn-create dropdown-toggle"
@@ -134,4 +141,10 @@
{% block js %}
{{ encore_entry_script_tags('page_suggest_names') }}
{{ encore_entry_script_tags('page_create_person') }}
{{ encore_entry_script_tags('mod_input_address') }}
{% endblock js %}
{% block css %}
{{ encore_entry_link_tags('mod_input_address') }}
{% endblock %}