Issue 853711 3

use app_modal_dialog-like element query approach
- turn single prototype to per prototype.method
- turn id query into class query

pass current test cases
Not a manager ever. PermissionDialog please.