[SOLVED] [Admin Extension] UI doesn't displayed.
Hello Guys,
I am developing an Admin Extension. Which adds a new tab to "Accounts" and also add a textbox to configure GID number. I've wrote following javascript code. With the code the tab is displayed under account edit form. But I cannot see any textbox or anything. Please help.
Code:
function GIdExtension() {}
ZaAccount.A_GId = "zimbraAccountGId";
// Add my new LDAP attrributes to ZaAccount.myXModel
if(ZaAccount.myXModel && ZaAccount.myXModel.items) {
ZaAccount.myXModel.items.push(
{id:ZaAccount.A_GId,
type:_STRING_,
ref:"attrs/"+ZaAccount.A_GId
}
);
}
if(ZaTabView.XFormModifiers["ZaAccountXFormView"]) {
GIdExtension.AccountXFormModifier = function (xFormObject) {
try{
/* find the SWITCH element which is the parent element for all tabs */
var cnt = xFormObject.items.length;
var i = 0;
for (i = 0; i <cnt; i++) {
if(xFormObject.items[i].type=="switch")
break; //index i now points to the SWITCH element
}
//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({value:posixTabIx, label:"GID"});
//define meta data for new form elements
var posixAccountTab = {
type:_ZATABCASE_, numCols:1,
relevant:("instance[ZaModel.currentTab] == " + posixTabIx),
items: [
{type:_ZAGROUP_,
items:[
{ref:ZaAccount.A_GId,
type:_TEXTFIELD_,
msgName:ZaAccount.A_GId,
label:ZaAccount.A_GId,
labelLocation:_LEFT_,
onChange:ZaTabView.onFormFieldChanged
}
]
}
]
};
//add the new tab to the list of tabs
xFormObject.items[i].items.push(posixAccountTab);
}catch(e){
alert(e);
}
};
ZaTabView.XFormModifiers["ZaAccountXFormView"].push(GIdExtension.AccountXFormModifier);
}
GIdExtension.AccountXFormModifier = function (xFormObject){
alert("I am here");
ZaTabView.XFormModifiers["ZaAccountXFormView"].push(GIdExtension.AccountXFormModifier);
}
Thank You.
I want to add one tab such as Mailbox Quota Under Domains
Hi,
I want add tab mailbox quota under domains so selected domain user mailbox quota will be displayed.