fix add batter bug and convert it to simple js show/hide instead of ajax