NIHVIVO-194 Change ids to classes to accomodate the possibility of additional related objects, and enclose the existing/addNew/new divs into a containing div
This commit is contained in:
parent
0a7a40074e
commit
e4a2e10c41
6 changed files with 47 additions and 37 deletions
|
@ -34,11 +34,13 @@ var customFormOneStep = {
|
|||
this.addNewLink = $('#addNewLink');
|
||||
this.existing = $('#existing');
|
||||
this.addNew = $('#new');
|
||||
this.entry = $('#entry');
|
||||
this.entry = $('.entry');
|
||||
this.existingOrNew = $('#existingOrNew');
|
||||
|
||||
this.cancel = this.form.find('.cancel');
|
||||
this.requiredHints = this.form.find('.requiredHint');
|
||||
this.requiredHints = this.form.find('.requiredHint');
|
||||
|
||||
this.close = this.form.find('.close');
|
||||
|
||||
// Read values used to control display
|
||||
this.editType = $("input[name='editType']").val();
|
||||
|
|
|
@ -48,11 +48,11 @@ var customFormTwoStep = {
|
|||
|
||||
// These may need to be changed to classes rather than ids, if there are
|
||||
// multiple sets of divs to show/hide during the workflow.
|
||||
this.addNewLink = $('#addNewLink');
|
||||
this.existing = $('#existing');
|
||||
this.addNew = $('#new');
|
||||
this.addNewLink = $('.addNewLink');
|
||||
this.existing = $('.existing');
|
||||
this.addNew = $('.new');
|
||||
this.entry = $('.entry');
|
||||
this.existingOrNew = $('#existingOrNew');
|
||||
this.existingOrNew = $('.existingOrNew');
|
||||
|
||||
this.cancel = this.form.find('.cancel');
|
||||
this.requiredHints = this.form.find('.requiredHint');
|
||||
|
@ -68,7 +68,7 @@ var customFormTwoStep = {
|
|||
// These are features that will NOT CHANGE throughout the workflow of the Javascript version..
|
||||
adjustForJs: function() {
|
||||
|
||||
var selectExistingLabel = $('#existing label');
|
||||
var selectExistingLabel = $('.existing label');
|
||||
selectExistingLabel.html(selectExistingLabel.html().replace(/Select (Existing )?/, ''));
|
||||
|
||||
this.existingOrNew.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue