| 68 | === Known Issues === |
| 69 | ==== Duplication of location records ==== |
| 70 | This happens when you for example create a new hospital record without creating a new location, but just selecting one (just select a country, for example). When you submit, then a new location record is created with the same name as the selected one - this seems wrong. You can make it visible by uncommenting the show_status line. The reason for this behaviour is that S3.gis.uuid is empty in case there is no old_location, which triggers the creation of a new record. Thus, this does not happen in update, and not either when you create a new location (which creates a new location anyway :D). |
| 71 | |
| 72 | ==== Use in Component Forms ==== |
| 73 | To be able to apply the location selector to components (e.g. person/presence, where it would be *very* useful), we need to go away from the 'request.controller+"_"+request_function' construction and instead use jr. |
| 74 | |
| 75 | Perhaps this way: |
| 76 | {{{ |
| 77 | {{try:}} |
| 78 | var location_id = '{{=jr.prefix+"_"+jr.target()[1]+ "_location_id"}}'; |
| 79 | {{except:}} |
| 80 | var location_id = '{{=request.controller+"_"+request.function+ "_location_id"}}'; |
| 81 | {{pass}} |
| 82 | }}} |