adessoSE/budgeteer

Contract file attachment

tinne opened this issue · 2 comments

tinne commented

The Create/Edit Contract View contains a delete button right in the vertical middle and beside the file upload box. Clicking this button leads to an internal error under all circumstances - new contract, existing contact without attachment or with existing attachment, existing or new contract with prepared but unsaved attachment.

Also, only a single file attachment seems to be forseen, but this is not easy to understand, as an existing attachment is silently replaced by a new if a new attachment is made to a contract with an existing attachment.

  • The trash bin button must be disabled or invisible if nothing can be deleted.
  • Any deletion or destructive replacement must be accompanied by a confirmatory question.
  • The visible appearance after successful upload must be identical to the appearance when re-editing a contract with an existing attachment (while the latter currently is right).

Is the behavior that only one file can be uploaded wanted or should an upload of multiple files be possible? Additionally the upload of the file can only be done with a submit of the complete form.
Furthermore the implementation using an AjaxEvent seems to be technically incorrect. At least there is no execution of the event in my local release branch.

@tinne we should define the requirements for this upload and make a new implementation.

tinne commented

replaced by #449