Jump to:
| Project: | User Handshakes |
| Version: | 5.x-1.1 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Just because a user hasn't defined whether they're dating or not doesn't mean they don't want to see if everyone else is... and since it's up to the recipient which fields to show, I don't see any reason to restrict what fields can be offered for sharing in a Handshake.
For example, if a user hasn't added what country they live in to their profile, that field will be disabled in their Initiate Handshakes form. However, that user might want to see that field on others' profiles, and other users might not mind sharing. The recipient is unlikely to upgrade the request though, leaving both in the dark (especially if the initiator later decides to input his country).
Ideally, this would be a configurable option on the Handshakes configuration page.
Would commenting out this code from the theme_nf_handshake_initiate function in handshakes.module prevent this behavior?
if ($data_text == '') {
$data_text .= t('<strong>No Value Entered</strong>');
$form['handshake']['fields'][$key4]['#attributes'] = array('disabled' => 1);
$form['handshake']['fields'][$key4]['#return_value'] = 'NULL';
}If so, that code could be wrapped in another "if" clause to allow administrators to toggle this ability. Of course, the toggling would also have to be added to the nf_handshake_settings function to get it to show up on the configuration form, as below:
$form['settings']['disable_empty'] = array(
'#type' => 'checkbox',
'#title' => t('Disallow users from asking to view unused fields'),
'#default_value' => isset($values['disable_empty']) ? $values['disable_empty'] : 0,
'#description' => t('Checking this box will allow users to ask to view fields in which they have not entered a value when they initiate a Handshake.')
);Fields which the initiator has not filled in should probably be colored red on the accept form as well (in the nf_handshake_view_hsr function).
Comments
#1
Without looking at the code to see if there are other dependencies, I'd say that you're on the right track and to give it a try. This seems like a reasonable feature request, so I'm marking this as 'needs review', which I'll formally do later.
#2
I've never rolled a patch before (*wince*), I'm exceptionally busy right now, and I've temporarily(?) disabled Handshakes for the time being because I had some complaints about it today. So I'll try to get to it eventually, but I'd say it's fairly likely that you'll get to it before I do.