-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DoB input should support "numbers of years" (#122)
1.3.7
- Loading branch information
1 parent
08b6fc1
commit a1349b9
Showing
8 changed files
with
96 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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,21 @@ | ||
<div class="control"> | ||
<input | ||
name="{{ include.prop_name }}" | ||
{% if include.isInYears %} type="text" {%else%} type="date" {%endif%} | ||
class="input" | ||
{% if data[include.prop_name] %} value="{{ data[include.prop_name] }}" {% endif %} | ||
/> | ||
</div> | ||
|
||
<div class="field"> | ||
<div class="control"> | ||
<input | ||
type="checkbox" | ||
name="option_dob_unknown" | ||
hx-target="#div_{{include.prefix}}{{include.prop.property_name}}" | ||
hx-post="/place/dob?place_type={{include.place_type}}&prefix={{include.prefix}}&prop_type={{include.prop.type}}" | ||
{% if include.isInYears %} checked {% endif%} | ||
/> | ||
<label>Date of birth unknown</label> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,26 +1,43 @@ | ||
{% if include.prop.type != 'generated' %} | ||
{% capture prop_name %}{{ include.prefix }}{{include.prop.property_name}}{% endcapture %} | ||
<div class="field"> | ||
|
||
<div id="div_{{ include.prefix }}{{include.prop.property_name}}" class="field"> | ||
<label class="label"> | ||
{{include.prop.friendly_name}} | ||
{% if data['option_dob_unknown'] %} | ||
Age in Years | ||
{%else%} | ||
{{include.prop.friendly_name}} | ||
{% endif%} | ||
</label> | ||
<div class="control"> | ||
{% if include.prop.type == 'select_one' or include.prop.type == 'select_multiple' %} | ||
{% | ||
include "components/contact_type_select.html" | ||
{% if include.prop.type == 'dob' %} | ||
{% | ||
include "components/contact_type_dob.html" | ||
prop_name=prop_name | ||
isInYears=data['option_dob_unknown'] | ||
place_type=include.place_type | ||
prefix=include.prefix | ||
prop=include.prop | ||
data=data | ||
%} | ||
{% else %} | ||
<input | ||
name="{{ prop_name }}" | ||
type="{% if include.prop.type == 'dob' %}date{% else %}text{% endif %}" | ||
class="input" | ||
{% if false and include.prop.type == 'regex' %} pattern="{{ include.prop.parameter }}" {% endif %} | ||
{% if data[prop_name] %} value="{{ data[prop_name] }}" {% endif %} | ||
/> | ||
{% endif %} | ||
</div> | ||
%} | ||
{% else %} | ||
<div class="control"> | ||
{% if include.prop.type == 'select_one' or include.prop.type == 'select_multiple' %} | ||
{% | ||
include "components/contact_type_select.html" | ||
prop_name=prop_name | ||
prop=include.prop | ||
data=data | ||
%} | ||
{% else %} | ||
<input | ||
name="{{ prop_name }}" | ||
type="{% if include.prop.type == 'dob' %}date{% else %}text{% endif %}" | ||
class="input" | ||
{% if false and include.prop.type == 'regex' %} pattern="{{ include.prop.parameter }}" {% endif %} | ||
{% if data[prop_name] %} value="{{ data[prop_name] }}" {% endif %} | ||
/> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} |
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
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
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