Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop hard-coding labels into default form XML #1210

Open
grantfitzsimmons opened this issue Jun 28, 2023 · 2 comments · May be fixed by specify/specify7#5367
Open

Stop hard-coding labels into default form XML #1210

grantfitzsimmons opened this issue Jun 28, 2023 · 2 comments · May be fixed by specify/specify7#5367

Comments

@grantfitzsimmons
Copy link
Member

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
Copy link
Member Author

We'll need to address this in the next Specify 6 update.

@grantfitzsimmons grantfitzsimmons transferred this issue from specify/specify7 Jun 28, 2023
@grantfitzsimmons
Copy link
Member Author

grantfitzsimmons commented Nov 6, 2024

All mentioned cases are resolved in specify7/#5367

@grantfitzsimmons grantfitzsimmons linked a pull request Nov 6, 2024 that will close this issue
36 tasks
@grantfitzsimmons grantfitzsimmons linked a pull request Nov 7, 2024 that will close this issue
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant