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

Dropdown with a list of country codes in the victim object #443

Open
mFaou opened this issue Oct 16, 2024 · 3 comments
Open

Dropdown with a list of country codes in the victim object #443

mFaou opened this issue Oct 16, 2024 · 3 comments

Comments

@mFaou
Copy link
Contributor

mFaou commented Oct 16, 2024

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 :)

@adulau
Copy link
Member

adulau commented Oct 17, 2024

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?

@iglocska
Copy link
Member

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.

@mFaou
Copy link
Contributor Author

mFaou commented Oct 18, 2024

What is a helper widget?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants