fixed delete template to support ajax.