Thanks for this great module. I am using it on a site which MUST be "accessible" (standards, all dropdowns must have labels), so I have created a patch. I know you are "feature frozen", however Drupal is widely used by Governments and Governments are obsessive about "standards", so please consider this. This is my first patch submission so I am a bit nervous! I have used fairly generic text for the label which suits my situation, but may not suit others. Look forward to your response.

CommentFileSizeAuthor
shs_label.patch3.77 KBscrypter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ssoulless’s picture

Issue summary: View changes
Status: Active » Needs work

Hello the patch you attaced is not well applied, if you download the version 7.x-1.x from the control version tab in the module's page you will see that the patch is applying in a folder modules/shs it should be applied inside the shs folder otherwise you cannot a pply well the patch...

ssoulless’s picture

Version: 7.x-1.6 » 7.x-1.x-dev

also changing version to devel version

ssoulless’s picture

I have correct the patch but the patch is deprecated, does not work with the actual dev, in my test site my shs fields are shown as textfields...

ssoulless’s picture

Status: Needs work » Closed (duplicate)

Closing this as duplicate of https://drupal.org/node/1991490

stBorchert’s picture

Status: Closed (duplicate) » Fixed

Thanks for your contribution, scrypter.
I've committed a slightly modified version of your patch.

Using the latest development version you can assign labels to any level within your hierarchy. Simply override hook_shs_js_settings_alter() or hook_shs_FIELDNAME_js_settings_alter() and set the "labels"-property in the field settings.
See hook_shs_FIELDNAME_js_settings_alter() in shs.api.php for an example.

  • stBorchert committed d23c64f on 7.x-1.x
    Issue #2096423: fix error on saving new terms.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

NIKS_Artreaktor’s picture

I have an Bug

If i using api
hook_shs_js_settings_alter()

for field in Views Exposed filter - it working - adding Label

But if you choose child (second select) "- ALL - "
It reset Main (first select) choice of select to ALL

FIX of this
Add JS code

$('select.shs-select-level-2').change(function(){
   if($(this).val() == 'All'){
      var countryval = $('#edit-shs-term-node-tid-depth-select-1 option:selected').val();								
      $('#edit-shs-term-node-tid-depth option:selected').val(countryval);
   }
   mainselect_val = $('#edit-shs-term-node-tid-depth option:selected').val();
});