1 (edited by daniel.marshall 13-01-2015 15:46:24)

Topic: Record Sensitivity - Adjusting drop down options and help text

I'd like to change some aspects of the sensitivity options on the 'Submit a sighting' and 'Submit Multiple Sightings' pages of our Indicia site.

Apart from the default 'none', I'd like 100m and 1km to be the only options available for blurring the record.

On the 'Submit a sighting' page I want to be able to edit the text 'This is the precision that the record will be shown at for public viewing'

I had a look at the code and at the options on the warehouse but a solution wasn't obvious.

Image attached to hopefully show what I am going on about!

Post's attachments

sensitivity 01.jpg 7.7 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

2

Re: Record Sensitivity - Adjusting drop down options and help text

Hi

Looking at the data_entry_helper::sensitivity_input() function I see the following

 $r .= data_entry_helper::select(array(
      'fieldname'=>$options['fieldname'],
      'id' => 'sensitive-blur',
      'label'=>lang::get('Blur record to'),
      'lookupValues' => array('100'=>lang::get('Blur to 100m'), '1000'=>lang::get('Blur to 1km'), '2000'=>lang::get('Blur to 2km'), 
                  '10000'=>lang::get('Blur to 10km'), '100000'=>lang::get('Blur to 100km')),
      'blankText' => 'none',
      'helpText' => 'This is the precision that the record will be shown at for public viewing'
    ));
   

The help text is hard coded, not even going through the translation function. The list of lookupValues is also not configurable.

This would need modifying to allow the values to be set by parameters passed in through the $options array. You would then be able to provide those options in the form structure of your Drupal page, at least for "Submit a sighting". The sensitivity for "Submit Multiple Sightings" is coded separately.

How is your PHP coding? Is this something you would like to work on and submit a patch for?

Jim Bacon.