Hello,
I want to add a search with between to postalCode-field (a varchar-field).
I've done:
1.) add to Espo/Custom/Resources/i18n/de_DE/Global.json:
2.) create Client/custom/lib/template.tpl with:
3. expand client/custom/res/templates/fields/varchar/search.tpl to:
4.) rebuild system
1.) is ok - I can translate in administration/.../global
but
there is still no choice "between" in search-parameter of field billingAddressPostalCode
Is one of my path for the expand or created files incorrect?
Or is there another file I had to create or expand?
Christoph
P.S:
I've checked that MariaDB is able to run selects with between
I want to add a search with between to postalCode-field (a varchar-field).
I've done:
1.) add to Espo/Custom/Resources/i18n/de_DE/Global.json:
"varcharSearchRanges": {
"between": "Zwischen"
},
"between": "Zwischen"
},
_delimiter_sai2qfjgah
custom/res/templates/fields/varchar/search.tpl
<select class="form-control search-type input-sm">
{{options searchTypeList searchType field='varcharSearchRanges'}}
</select>
<input
type="text"
class="main-element form-control input-sm"
data-name="{{name}}"
value="{{searchData.value}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
autocomplete="espo-{{name}}"
placeholder="{{translate 'Value'}}"
{{#if noSpellCheck}}
spellcheck="false"
{{/if}}
>
<input
type="text"
class="form-control{{#ifNotEqual searchType 'between'}} hidden{{/ifNotEqual}} additional input-sm"
data-name="{{name}}-additional"
value="{{value2}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
placeholder="{{translate 'Value'}}"
autocomplete="espo-{{name}}-additional"
spellcheck="false"
>
custom/res/templates/fields/varchar/search.tpl
<select class="form-control search-type input-sm">
{{options searchTypeList searchType field='varcharSearchRanges'}}
</select>
<input
type="text"
class="main-element form-control input-sm"
data-name="{{name}}"
value="{{searchData.value}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
autocomplete="espo-{{name}}"
placeholder="{{translate 'Value'}}"
{{#if noSpellCheck}}
spellcheck="false"
{{/if}}
>
<input
type="text"
class="form-control{{#ifNotEqual searchType 'between'}} hidden{{/ifNotEqual}} additional input-sm"
data-name="{{name}}-additional"
value="{{value2}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
placeholder="{{translate 'Value'}}"
autocomplete="espo-{{name}}-additional"
spellcheck="false"
>
<select class="form-control search-type input-sm">
{{options searchTypeList searchType field='varcharSearchRanges'}}
</select>
<input
type="text"
class="main-element form-control input-sm"
data-name="{{name}}"
value="{{searchData.value}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
autocomplete="espo-{{name}}"
placeholder="{{translate 'Value'}}"
{{#if noSpellCheck}}
spellcheck="false"
{{/if}}
>
<input
type="text"
class="form-control{{#ifNotEqual searchType 'between'}} hidden{{/ifNotEqual}} additional input-sm"
data-name="{{name}}-additional"
value="{{name2}}""
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
placeholder="{{translate 'Value'}}"
autocomplete="espo-{{name}}-additional"
spellcheck="false"
>
{{options searchTypeList searchType field='varcharSearchRanges'}}
</select>
<input
type="text"
class="main-element form-control input-sm"
data-name="{{name}}"
value="{{searchData.value}}"
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
autocomplete="espo-{{name}}"
placeholder="{{translate 'Value'}}"
{{#if noSpellCheck}}
spellcheck="false"
{{/if}}
>
<input
type="text"
class="form-control{{#ifNotEqual searchType 'between'}} hidden{{/ifNotEqual}} additional input-sm"
data-name="{{name}}-additional"
value="{{name2}}""
{{#if params.maxLength}}maxlength="{{params.maxLength}}" {{/if}}
{{#if params.size}}size="{{params.size}}"{{/if}}
placeholder="{{translate 'Value'}}"
autocomplete="espo-{{name}}-additional"
spellcheck="false"
>
1.) is ok - I can translate in administration/.../global
but
there is still no choice "between" in search-parameter of field billingAddressPostalCode
Is one of my path for the expand or created files incorrect?
Or is there another file I had to create or expand?
Christoph
P.S:
I've checked that MariaDB is able to run selects with between