Change id attribute

Signed-off-by: José Luis Di Biase <josx@interorganic.com.ar>
Moving functions to views, and ajax calls to model

Signed-off-by: José Luis Di Biase <josx@interorganic.com.ar>