Adds base logic for dialog when adding new rule