Cht-core: Modify the upload_xform script to set the form icon

Created on 16 Oct 2016  路  9Comments  路  Source: medic/cht-core

In #2794 we modified the UI to display a custom icon beside forms and reports. For Enketo forms this is set as a string property on the form doc. We use a custom upload_xform script to create form docs and set metadata such as the context. Modify this script to also set the icon string.

The context metadata is stored in a separate file which is read and save to the doc. It might make sense to make it more generic so that file is a JSON blob with context and icon properties. This could then be used to add any future metadata without updating the script further.

Bug

All 9 comments

@abbyad I think you're probably most familiar with this script - does the proposal make sense?

Ya, that makes perfect sense.

@alxndrsn Another small review for you if you'd be so kind!

LGTM

AT: execute the scripts/upload_xform.sh script using the -m option for providing a meta file which uploads an icon with the form.

@abbyad and I have used the script but it still needs some changes to work properly. We were able to get it working with the -m option but only by sort of hacking the script so that it would no longer work with the -c option. Perhaps @abbyad can follow up with more info.

Is this still outstanding @sglangevin @abbyad ?

This was fixed a while ago and we're also moving to medic-configurer anyway, which means that we won't be using this script anymore. We can mark this ready.

Was this page helpful?
0 / 5 - 0 ratings