Add some logic for add foreign button #12