HUE-1021 [fb] Modals won't open anymore after clicking on Cancel and changing the file selection

Changed hidden fields logic