developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 8 years ago
Closed 8 years ago
#1504 closed bug (fixed)
menulist displays empty item with required=true
Reported by: | erp67 | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Jelix 1.3.6 |
Component: | jelix:forms | Version: | 1.4.2 |
Severity: | normal | Keywords: | menulist required |
Cc: | Blocked By: | ||
Blocking: | Documentation needed: | no | |
Hosting Provider: | Php version: |
Description
<menulist> ignores required=true tag when used with <datasource> or getControl()->datasource.
When no default value exists and required is set, it creates a weird <option value selected="selected"> entry.
Patch enclosed to fix this problem.
Attachments (2)
Change History (7)
Changed 8 years ago by erp67
comment:1 Changed 8 years ago by laurentj
- Component changed from jelix to jelix:forms
Sorry. I don't know this format of patch. Please provide a patch with a standard format (like Git or Mercurial generate)
Changed 8 years ago by erp67
comment:2 Changed 8 years ago by erp67
Hello, I use neither git or mercurial, I have attached the patch in a different format (unified diff) which is probably more human readable. To apply it, go in lib/jelix/forms and run command patch < unified_diff_patch
comment:3 Changed 8 years ago by laurentj
We already did this kind of code, but some developers want the empty label displayed : https://github.com/jelix/jelix/commit/14eff2c30c13c1bc6352576a7885338d3a55f3dc
We should have an other strategy..
comment:4 Changed 8 years ago by laurentj
- Milestone set to Jelix 1.4.3
- Status changed from new to confirmed
comment:5 Changed 8 years ago by laurentj
- Milestone changed from Jelix 1.4.3 to Jelix 1.3.6
- Resolution set to fixed
- Status changed from confirmed to closed
Patch to fix the problem.