Prerequisite
JRE needs to installed on machine to run JAR command
Change field name on UI
- Download the sample plugin.
Extract the downloaded plugin into a folder Eg. os-sample-plugin.
$ jar -xf os-sample-plugin.jar
To change a field name appearing on UI, edit file os-sample-plugin/test/META-INF/resources/os-plugin/i18n/en.js, add previous and new name of the field which needs to be changed in the key value format. Eg. Change the field name 'Short Title' to 'Request ID' of Distribution protocol.
{ "dp" : { "short_title": "Request ID" } }
- Save and exit os-sample-plugin/test/META-INF/resources/os-plugin/i18n/en.js the file.
Change the field name in the backend
To change the field name from the BO templates, user has to be update the message.properties file.
Follow below steps to update the message.properties file:
- Edit os-sample-plugin/os-plugin-jar/errors/message.properties to change the value of field in backend. Search for the field name that needs to be changed. Eg. Change the field name 'Short Title' to 'Request ID' of Distribution protocol.
dp_short_title = Short Title
Replace Short Title with Request ID.
dp_short_title = Request ID
- Save and exit message.properties
Create new plugin using given command:
$jar -cf os-sample-plugin.jar META-INF/ pluginContext.xml errors/ pluginApiContext.xml pluginContext.xml
- Copy the newly created plugin to $OS_HOME/plugins/ and restart OpenSpecimen service.