NIHVIVO-193. Work on custom form for person has position history. Generalized css and javascript to work with other custom forms that will be built for version 1.0 (see NIHVIVO-141).

This commit is contained in:
rjy7 2010-03-29 15:41:45 +00:00
parent 1b4b52954d
commit 3f09ddf7d2
6 changed files with 484 additions and 94 deletions

View file

@ -0,0 +1,42 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
var customForm = {
onLoad: function() {
var button = $('#submit');
var addNewLink = $('#addNewLink');
var existing = $('#existing');
var addNew = $('#new');
var entry = $('#entry');
var editType = $("input[name='editType']").val();
var entryType = $("input[name='entryType']").val();
if (editType == 'add') {
// Set up form for step 1
addNewLink.show();
addNew.hide();
entry.hide();
button.val('Continue');
// Add event listeners
button.bind('click', function() {
entry.show();
addNewLink.hide();
$(this).val('Create ' + entryType);
$(this).unbind('click');
return false;
});
} else { // editing existing entry
}
}
};
$(document).ready(function(){
customForm.onLoad();
});

View file

@ -1,14 +1,2 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
var personHasPositionHistory = {
onLoad: function() {
$("#newOrg").hide();
$("#position").hide();
$("#submit").val("Continue");
}
};
$(document).ready(function(){
personHasPositionHistory.onLoad();
});