misp-objects icon indicating copy to clipboard operation
misp-objects copied to clipboard

Dropdown with a list of country codes in the victim object

Open mFaou opened this issue 1 year ago • 3 comments

Hello, To facilitate the filling of the regions field, I would like to include a list of ISO 3166 country codes (specifically the 2 letters form). What would be nice, would be to be able to search for either the country name or the 2 letters code, and then it would fill the code.

However, it seems that with the sane_default attribute, the same text is displayed in the drop-down and then filled. Is it somehow possible to do something like an HTML select tag, with a different option value and displayed value? For instance:

<option value="lu">Luxembourg (lu)</option>

If it's not a good idea, let me know as well :)

mFaou avatar Oct 16 '24 20:10 mFaou

Thanks for the feedback. It's a change in the misp-object template format as we would need a double list. @iglocska @mokaddem what do you think of this?

adulau avatar Oct 17 '24 04:10 adulau

I think a potential solution (a double list would be really tricky) is to have a helper widget for specific types. We could create a new country code type and hook the value field in the object add/edit templates.

iglocska avatar Oct 17 '24 07:10 iglocska

What is a helper widget?

mFaou avatar Oct 18 '24 18:10 mFaou