Stop hard-coding labels into default form XML
grantfitzsimmons opened this issue · 1 comments
grantfitzsimmons commented
As reported by @bronwyncombs, the field value
on the pick list item form has the label "value" (with a lowercase v
) on every database.
This is because this was hard-coded into the XML:
<row>
<cell type="label" labelfor="value" label="value"/>
<cell type="field" id="value" name="value" label="Value" uitype="text" isrequired="true"/>
</row>
Source: system.views.xml
Same story for the PrepType
form:
<row>
<cell type="label" labelfor="1" label="Name"/>
<cell type="field" id="1" name="name" uitype="text" isrequired="true"/>
<cell type="field" id="2" name="isLoanable" label="Is Loanable" uitype="checkbox"/>
</row>
and for the PickList
form:
<row>
<cell type="label" labelfor="typesCBX" label="Type"/>
<cell type="field" id="typesCBX" name="typesCBX" uitype="combobox" ignore="true"/>
</row>
<row>
<cell type="label" labelfor="name" label="Name"/>
<cell type="field" id="name" name="name" uitype="text" isrequired="true" cols="30" colspan="3" initialize="editoncreate=true" />
</row>
<row>
<cell type="label" labelfor="readOnly" label=""/>
<cell type="field" id="readOnly" name="readOnly" label="Read Only" uitype="checkbox"/>
</row>
There are many instances like this, especially in the aforementioned XML file thanks to the way that Specify 6 was developed.
As we push localization and multi-language support going forward, hard-coding these things eliminates our ability to use the schema names for these fields, which are already valid. There is no need to hard-code labels in these instances.
grantfitzsimmons commented
We'll need to address this in the next Specify 6 update.