initFormFullView was being called twice in edit mode; also in edit mode acSelection label was not being changed

This commit is contained in:
tworrall 2012-06-19 20:05:31 +00:00
parent 4d680092d5
commit dc83b26551

View file

@ -136,7 +136,6 @@ var customForm = {
// if ((!this.supportEdit) && (this.editMode == 'edit' || this.editMode == 'repair')) {
if (this.editMode == 'edit' || this.editMode == 'repair') {
this.initFormWithValidationErrors();
this.initFormFullView();
}
else if (this.findValidationErrors()) {
this.initFormWithValidationErrors();
@ -164,8 +163,7 @@ var customForm = {
this.cancel.unbind('click');
},
initFormFullView: function() {
initFormFullView: function(source) {
this.setType();
this.fullViewOnly.show();
this.or.show();
@ -203,6 +201,7 @@ var customForm = {
// acType, which is set in initFormFullView.
this.initFormFullView();
$.each(this.acSelectors, function() {
var $acSelection = customForm.acSelections[$(this).attr('acGroupName')];
var uri = $acSelection.find('input.acUriReceiver').val(),
@ -546,6 +545,10 @@ var customForm = {
if (selectedType.val().length) {
this.acTypes[acTypeKey] = selectedType.val();
this.typeName = selectedType.html();
if ( this.editMode == 'edit' ) {
var $acSelect = this.acSelections[acTypeKey];
$acSelect.find('label').html('Selected ' + this.typeName + ':');
}
}
// reset to empty values; may not need
else {