Both of them?

I hope you understand client script runs first and then UI policy, so whichever condition you have in UI policy will override client script logic.

Its suggested to keep them in one place, so you can better handle the order of the execution.

There must be some conflict there which  is causing this.