Implementing Flag Functionality in addItem dialog

There is still an issue with the flags not deleting properly, the a
click handler isn't firing :(