Changeset 990


Ignore:
Timestamp:
Oct 25, 2010, 4:30:08 PM (6 years ago)
Author:
robert@…
Message:

Fixed bug #21: error when adding a person to a study without selecting a role

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy

    r976 r990  
    12731273
    12741274        def _contactAddButtonAddition = { attrs, body ->
    1275                 out << '<input type="button" onClick="addContact ( \'' + attrs.name + '\' ); $(\'#' + attrs.name + '_dialog\').hide(); $( \'#' + attrs.name + '_dialogButton\' ).show();" value="Add">';
     1275                out << '<input type="button" onClick="if( addContact ( \'' + attrs.name + '\' ) ) { $(\'#' + attrs.name + '_dialog\').hide(); $( \'#' + attrs.name + '_dialogButton\' ).show(); }" value="Add">';
    12761276                out << '<input type="button" onClick="$(\'#' + attrs.name + '_dialog\').hide(); $( \'#' + attrs.name + '_dialogButton\' ).show();" value="Close">';
    12771277        }
  • trunk/web-app/js/wizard.js

    r980 r990  
    589589  var role_id = $( '#' + element_id + '_role' ).val();
    590590
     591  if( person_id == "" || person_id == 0 || role_id == "" || role_id == 0 ) {
     592        alert( "Please select both a person and a role." );
     593        return false;
     594  }
     595
    591596  var combination = person_id + '-' + role_id;
    592597
     
    603608        $( '#' + element_id + '_none' ).css( 'display', 'none' );
    604609    }
     610
     611        return true;
    605612}
    606613
Note: See TracChangeset for help on using the changeset viewer.