Update base.js

Refactored upload photo method and submit formview features