Add search directive
Add main search onsubmit check