developer.jelix.org is not used any more and exists only for
history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 10 years ago
Last modified 9 years ago
#1336 assigned bug
jForms: empty upload controls linked to a dao property should not erase the property's value
Reported by: | Julien | Owned by: | Julien |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | jelix:forms | Version: | trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Documentation needed: | no | |
Hosting Provider: | Php version: |
Description
...either you would have to upload the file every time you submit the form in update context...
Change History (5)
comment:1 Changed 10 years ago by Julien
- Owner set to Julien
- Status changed from new to assigned
comment:2 Changed 10 years ago by laurentj
- review changed from review? to review-
comment:3 Changed 10 years ago by Julien
this patch is a first part from a work in progress on my side, which will allow quite good management of files in jForms.
- good mapping to dao properties (good in case you need to overload forms/dao for a specific client who wants 13 upload fields where you only put 12... ;) and you don't want to modify the controller's/classes' code )
- in case of editing a form, auto-fill of upload controls (not the input type="file" itself of course), with preview for browser compatible images and link for others file types.
- of course, empty uploads should not erase existing ones, I don't want to re-upload of my files when just changing the title field (that's what this patch does)
- if the field is not required, add an extra "delete this file" aside the control
why I already posted this part of the patch : because I made an app and when editing forms all file associations were erased ; so it's a quick fix for my first problem. Now you just re-upload when you want to change a file.
I really think that an upload control should be mappable to a dao, as we do for every other control in jforms ; and I'm working on it to have that management easy way.
comment:4 Changed 10 years ago by laurentj
- Milestone Jelix 1.3 deleted
comment:5 Changed 9 years ago by laurentj
- review review- deleted
Note: See
TracTickets for help on using
tickets.
Because of the specific behavior of input type="file" in browser, it's obvious for me that an upload control should not be mapped on a dao file.
And if this is the case, I think your patch is not the right way. How can we "erase" the field ? (with a null value or "")