initFormFullView was being called twice in edit mode; also in edit mode acSelection label was not being changed
This commit is contained in:
parent
4d680092d5
commit
dc83b26551
1 changed files with 6 additions and 3 deletions
|
@ -136,7 +136,6 @@ var customForm = {
|
||||||
// if ((!this.supportEdit) && (this.editMode == 'edit' || this.editMode == 'repair')) {
|
// if ((!this.supportEdit) && (this.editMode == 'edit' || this.editMode == 'repair')) {
|
||||||
if (this.editMode == 'edit' || this.editMode == 'repair') {
|
if (this.editMode == 'edit' || this.editMode == 'repair') {
|
||||||
this.initFormWithValidationErrors();
|
this.initFormWithValidationErrors();
|
||||||
this.initFormFullView();
|
|
||||||
}
|
}
|
||||||
else if (this.findValidationErrors()) {
|
else if (this.findValidationErrors()) {
|
||||||
this.initFormWithValidationErrors();
|
this.initFormWithValidationErrors();
|
||||||
|
@ -164,8 +163,7 @@ var customForm = {
|
||||||
this.cancel.unbind('click');
|
this.cancel.unbind('click');
|
||||||
},
|
},
|
||||||
|
|
||||||
initFormFullView: function() {
|
initFormFullView: function(source) {
|
||||||
|
|
||||||
this.setType();
|
this.setType();
|
||||||
this.fullViewOnly.show();
|
this.fullViewOnly.show();
|
||||||
this.or.show();
|
this.or.show();
|
||||||
|
@ -202,6 +200,7 @@ var customForm = {
|
||||||
// Call initFormFullView first, because showAutocompleteSelection needs
|
// Call initFormFullView first, because showAutocompleteSelection needs
|
||||||
// acType, which is set in initFormFullView.
|
// acType, which is set in initFormFullView.
|
||||||
this.initFormFullView();
|
this.initFormFullView();
|
||||||
|
|
||||||
|
|
||||||
$.each(this.acSelectors, function() {
|
$.each(this.acSelectors, function() {
|
||||||
var $acSelection = customForm.acSelections[$(this).attr('acGroupName')];
|
var $acSelection = customForm.acSelections[$(this).attr('acGroupName')];
|
||||||
|
@ -546,6 +545,10 @@ var customForm = {
|
||||||
if (selectedType.val().length) {
|
if (selectedType.val().length) {
|
||||||
this.acTypes[acTypeKey] = selectedType.val();
|
this.acTypes[acTypeKey] = selectedType.val();
|
||||||
this.typeName = selectedType.html();
|
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
|
// reset to empty values; may not need
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue