School told to change dress code