Change categories when editing a rule

#165 
can we indent this whole dl block since it's inside of an IF condition