Opened 3 years ago
Closed 16 months ago
#1870 closed Enhancement (invalid)
Profile plugin fails to show array based input types
| Reported by: | brettp | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Needs Review |
| Component: | Profile | Version: | 1.7 |
| Severity: | minor | Keywords: | |
| Cc: | brettp | Difficulty: |
Description
(Copied from http://trac.elgg.org/elgg/ticket/1047)
Adding a radio button to the profile:fields fails to show the selectable options.
Possible fix:
profile/views/default/profile/userdetails.php @@ -112,8 +112,11 @@
?>: </b> <?php
- - echo elgg_view("output/{$valtype}",array('value' => $varsentity?->$shortname)); + if (is_array($valtype)) { + echo elgg_view("output/{$valtype[svn:0]}",array('value' => elgg_echo($varsentity?->$shortname))); + } else { + echo elgg_view("output/{$valtype}",array('value' => $varsentity?->$shortname)); + }
?>
profile/views/default/profile/edit.php @@ -44,10 +44,20 @@
<p>
<label>
<?php echo elgg_echo("profile:{$shortname}") ?><br />
- <?php echo elgg_view("input/{$valtype}",array( - 'internalname' => $shortname, - 'value' => $value, - )); ?> + <?php + if (is_array($valtype)) { + echo elgg_view("input/{$valtype[svn:0]}",array( + 'internalname' => $shortname, + 'value' => $varsentity?->$shortname, + 'options'=>$valtype[svn:1], + )); + } else { + echo elgg_view("input/{$valtype}",array( + 'internalname' => $shortname, + 'value' => $value, + )); + } + ?>
</label>
<?php echo elgg_view('input/access',array('internalname' => 'accesslevel.$shortname.?', 'value' => $access_id)); ?>
</p>
Change History (1)
comment:1 Changed 16 months ago by cash
- Milestone set to Needs Review
- Resolution set to invalid
- Severity set to minor
- Status changed from new to closed
- Version set to 1.7
Note: See
TracTickets for help on using
tickets.

This ticket is hard to read so I'm closing it.