Bug 1082993 - [settings] refactor Developer panel with AMD pattern

Suggest to move these into a separate function called `updateWidgetUI` or something else to make code more cleaner and easy to test.