Hello Everyone,

I am trying to extend add domain wizard as well as edit domain with some my custom requirement. I am using admin zimlet to do the same. Following is the code with does the same. Problem is the signature form is getting displayed in edit domain page but not in new domain wizard.

function SignatureExtension() {}

ZaDomain.A_SignatureID = "zimbraDomainSignatureId";
ZaDomain.A_SignatureIDTitle = "This is Title";


// Add my new LDAP attrributes to ZaDomain.myXModel
if(ZaDomain.myXModel && ZaDomain.myXModel.items) {
ZaDomain.myXModel.items.push(
{id:ZaDomain.A_SignatureID,
type:_STRING_,
ref:"attrs/"+ZaDomain.A_SignatureID
}
);
}



if(ZaTabView.XFormModifiers["ZaDomainXFormView"]) {

SignatureExtension.DomainXFormModifier = function (xFormObject) {

//find the index of the next tab

var posixTabIx = ++this.TAB_INDEX;

//tab bar is the element with index 1

var tabBar = xFormObject.items[1];

//add the new tab button to the tab bar
tabBar.choices.push({valueosixTabIx, label:signature.Tab_signature});

//define meta data for new form elements

var posixAccountTab = {

type:_ZATABCASE_,id:"domain_form_signature",numCol s:1, colSizes:["800px"],
caseKey: posixTabIx,

items: [

{type:_ZAGROUP_,

items:[

{ref:ZaDomain.A_SignatureID,

type:_TEXTFIELD_, editable:true,

msgName:"signature group",

label:signature.signature_label,

labelLocation:_LEFT_,

onChange:ZaTabView.onFormFieldChanged} ]

}

]

};



/* find the SWITCH element which is the parent element for all tabs */

for (var i = 0; i <xFormObject.items.length; i++) {
if(xFormObject.items[i].type=="switch"){
break; //index i now points to the SWITCH element
}
}
xFormObject.items[i].items.push(posixAccountTab);

}


ZaTabView.XFormModifiers["ZaDomainXFormView"].push(SignatureExtension.DomainXFormModifier);
//alert("Finally Account Form");

}

if(ZaXDialog.XFormModifiers["ZaNewDomainXWizard"]) {
SignatureExtension.NewDomainWizXFormModifier = function(xFormObject,entry) {
var cnt = xFormObject.items.length;
var switchGroup;
for(var i = 0; i <cnt; i++) {
if(xFormObject.items[i].type=="switch") {
switchGroup = xFormObject.items[i];
break;
}
}
ZaNewDomainXWizard.signature_STEP = ++this.TAB_INDEX;
//this._lastStep++;
this.stepChoices.push({value:ZaNewDomainXWizard.si gnature_STEP, label:signature.Tab_signature});


var posixWizAccountTab = {
type:_CASE_,id:"domain_wiz_form_signature",numCols :1,
caseKey: ZaNewDomainXWizard.signature_STEP,tabGroupKey:ZaNe wDomainXWizard.signature_STEP,

items: [

{type:_ZAGROUP_,

items:[

{ref:ZaDomain.A_SignatureID,

type:_TEXTFIELD_, editable:true,

msgName:"signature group",

label:signature.signature_label,

labelLocation:_LEFT_
}
]
}
]
};
switchGroup.items.push(posixWizAccountTab);
}
ZaXDialog.XFormModifiers["ZaNewDomainXWizard"].push(SignatureExtension.NewDomainWizXFormModifier );
}
Please help..

Thank You!