modified html and js to work with rails entries api