ticket:14 fixed bug with photo updating
ticket:15 added test for template