...
- Download the sample plugin.
Extract the downloaded plugin in to a folder and delete jar file. Eg. os-sample-plugin
Code Block language bash $ jar -xvf os-sample-plugin.jar
To change a field name appearing in UI, edit file os-sample-plugin/test/META-INF/resources/os-plugin/i18n/en.js and add , add previous and new name of the field which needs to be changed in the key value format. Eg. To change Change the field name 'Short Title field in Distribution protocol to appear as ' to 'Request ID' of Distribution protocol.
Code Block language js { "dp" : { "short_title": "Request ID" } }
- Save and exit os-sample-plugin/test/META-INF/resources/os-plugin/i18n/en.js the file.The en.js file will change the value in UI. To change the a field in backend and in Templates message.properties needs to be updated.
Change the field name from BO templates
To change the field anem 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 the
- for the field name that needs to be changed.
- Eg. Change the field name 'Short Title' to 'Request ID' of Distribution protocol.
eg. If dp_short_title should be Request ID instead of Short Title.
Code Block language bash dp_short_title = Short Title
Replace Short Title with Request ID.
Code Block language bash dp_short_title = Request ID
- Save and exit message.properties
Create new plugin using given command:
Code Block language bash $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.
...