rewrite attributes to checkboxes which create correct quiery when combined with inputs, make attr_operators optional