Changeset 297

Show
Ignore:
Timestamp:
04/20/10 17:22:18 (3 years ago)
Author:
fabio.montefuscolo
Message:

fix partially the id for cluetip

Location:
trunk/clinicaltrials
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/clinicaltrials/repository/trds_forms.py

    r294 r297  
    5858                                            'field': unicode(bf), 
    5959                                            'help_text': help_text, 
    60                                             'help_id': 'help%s' % help_record.pk, 
     60                                            'help_id': 'id_%s-help%s' % ((self.prefix or name),help_record.pk), 
    6161                                            'issue': issue_text,}) 
    6262        if top_errors: 
     
    7777                                             'field': '', 
    7878                                             'help_text': '', 
    79                                              'help_id': 'help%s' % help_record.pk, 
     79                                             'help_id': 'id_%s-help%s' % (self.prefix,help_record.pk), 
    8080                                             'issue': '',} 
    8181                    output.append(last_row) 
  • trunk/clinicaltrials/static/js/submission.utils.js

    r291 r297  
    1515        var newFor = $(this).attr('for').replace('-' + (total-1) + '-','-' + total + '-'); 
    1616        $(this).attr('for', newFor); 
     17    }); 
     18    newElement.find('img[rel]').each(function() { 
     19        var newFor = $(this).attr('rel').replace('-' + (total-1) + '-','-' + total + '-'); 
     20        $(this).attr('rel', newFor); 
     21    }); 
     22    newElement.find('div[id]').each(function() { 
     23        var newFor = $(this).attr('id').replace('-' + (total-1) + '-','-' + total + '-'); 
     24        $(this).attr('id', newFor); 
    1725    }); 
    1826    total++;