Consolidate rendering of partial or full error templates depending on ajax