Campaigning solicitor to shut firm after court defeat