[
{
    blockid=expire;
    help=store_expire_expire;
    custom=com.netscape.management.msgserv.StoreExpireControl;
    localvar={
	/* translate this block */
	.header.text="Automatic Message Removal Policy(Expire & Purge)";
	.rules.text="Expiration rules";
	.col0.header="Exclusive";
	.col1.header="Name";
	.col2.header="Target";
	.col3.header="FolderSize";
	.col4.header="Count";
	.col5.header="Age";
	.col6.header="MsgSize";
	.col7.header="GracePeriod";
	.col8.header="Seen";
	.col9.header="Deleted";
	.rule.help="Message store expire rules";
	.save.error="Failed to save expire rule settings";
	
        .sched.title="Expire/Purge Schedule";
        .sched.expire.text="Run expire task ";
        .sched.purge.text="Run purge task(Default is when expire is finished) ";
        .sched.month=["Every","1","2","3","4","5","6","7","8","9","10","11","12"];
        .sched.monthlabel="month of the year";
        .sched.dofmth=["Every","1","2","3","4","5","6","7","8","9","10","11","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"];
        .sched.dofwk=["Every","0","1","2","3","4","5","6"];
        .sched.dofmthlabel="day of the month";
        .sched.dofwklabel="day of the week";
        .sched.hour=["Every","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23"];
        .sched.min =["Every","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"];
        .sched.hourlabel="hour of the day";
        .sched.minlabel="minute of the hour";	
    };
    content=[
	{
	    ctrl=pane;
	    layout=[ybox];
	    content=[
		{
		    ctrl=label;
		    text=$.header.text;
		    wrap=$g.label.size5;
		    font=["","",16];
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=separator;
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=label;
		    id=rulelabel;
		    text=$.rule.help;
		},
		{
		    ctrl=table;
		    id=ruletable;
		    label=rulelabel;
		    showedit=true;
  		    addtext=$g.addbutton.text;
	            edittext=$g.editbutton.text;
		    deltext=$g.deletebutton.text;
		    columns=[
			{
			    header=$.col0.header;
			    renderer=boolean;
			    editor=boolean;
			    width=30;
			},
			{
			    header=$.col1.header;
			    width=70;
			},
			{
			    header=$.col2.header;
			    width=90;
			},
			{
			    header=$.col3.header;
			    width=80;
			},
			{
			    header=$.col4.header;
			    width=50;
			},
			{
			    header=$.col5.header;
			    width=30;
			},
			{
			    header=$.col6.header;
			    width=50;
			},
			{
			    header=$.col7.header;
			    width=30;
			},
			{
			    header=$.col8.header;
			    width=30;
			},
			{
			    header=$.col9.header;
			    width=30;
			}			
		    ];
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=label;
		    text=$.sched.title;
		    wrap=$g.label.size5;
		    font=["","",16];
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=separator;
		},
		{ /** expire/purge schedule pane **/
		    ctrl=pane;
		    layout=[ybox];
		    border=$.sched.border;
		    content=[
		 	{			
			    ctrl=pane;
			    content=[
			    	{
			    		ctrl=label;
			    		id=expirelabel;
			    		text=$.sched.expire.text;
			    		wrap=$g.label.size1;
			    	},
			    	{
			    		ctrl=hglue;
			    	}

			   ]
			},		    
		 	{			
			    ctrl=pane;
			    
			    content=[
			    	{
			    		ctrl=hglue;
			    	},
			    	{ 
			    		ctrl=text;
			    		id=expiremonth;
			    		val="*";
			    		label=expirelabel;			    	
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.monthlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			        {
			        	ctrl=hglue;
			        },
			    	{ 
			    		ctrl=text;
			    		id=expiredofmth;
			    		val="*";
			    		label=expirelabel;			    		
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.dofmthlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=expiredofwk;
			    		val="*";
			    		label=expirelabel;			    		
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.dofwklabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=expirehour;
			    		val="*";
			    		label=expirelabel;			    		
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.hourlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=expiremin;
			    		val="*";
			    		label=expirelabel;			    		
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.minlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=separator;
			},
			{
			    ctrl=vstrut;
			},
			/* purge schedule */
		 	{			
			    ctrl=pane;
			    content=[
			    	{
			    		ctrl=label;
			    		id=purgelabel;
			    		text=$.sched.purge.text;
			    		wrap=$g.label.size5;
			    	},
			    	{
			    		ctrl=hglue;
			    	}

			   ]
			},		    
		 	{			
			    ctrl=pane;
			    content=[
			    	{
			    		ctrl=hglue;
			    	},
			    	{ 
			    		ctrl=text;
			    		id=purgemonth;
			    		val="*";
			    		label=purgelabel;
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.monthlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			        {
			        	ctrl=hglue;
			        },
			    	{ 
			    		ctrl=text;
			    		id=purgedofmth;
			    		val="*";
			    		label=purgelabel;
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.dofmthlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=purgedofwk;
			    		val="*";
			    		label=purgelabel;
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.dofwklabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=purgehour;
			    		val="*";
			    		label=purgelabel;
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.hourlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			},
		 	{			
			    ctrl=pane;
			    content=[
			     	{
			     		ctrl=hglue;
			     	},
			    	{ 
			    		ctrl=text;
			    		id=purgemin;
			    		val="*";
			    		label=purgelabel;
			    	},
			    	{
			    		ctrl=rigid;
			    	},
			    	{
			    		ctrl=label;
			    		text=$.sched.minlabel;
			    		wrap=$g.label.size1;
			    	}
			   ]
			}																			
		    ]
		}
	    ]
	}
    ]
},
{
    blockid=editrule;
    help=store_expire_editrule;
    localvar={
	/* translate this block */
	.name.text="Name:";
	.target.text="Apply to folders matching the following pattern:";
	.folder.title="Folder size constraint";
	.sizelimit.text="Remove the oldest messages until the following conditions are true.";
	.num.text="Message count:";
	.msgage.text="Message age constraint";
	.agelimit.text="Remove messages that have been in the folder longer than the specified number of days.";
	.msgsize.title="Message size constraint";
	.msizelimit.text="Remove messages that are larger than the specified size and has been in the folder longer than the grace period.";
	.days.text="Number of days:";
	.days.labels=["Day(s)"];
	.exclusive.help="Make this the exclusive rule for the folders matching the above specified pattern.";
	.exclusive.text="Exclusive";

	.size.text="Folder size:";
	.size.labels=["KByte(s)","MByte(s)"];
	.msgsize.text="Message size limit:";
	.msgsize.labels=["KByte(s)","MByte(s)"];
	.sizeday.labels=["Day(s)"];
	.sizeday.text="Grace period:";
        .purge.labels=["Hour(s)"];
	.purge.text="Purge time:";

        .msgflags.title="Message flags constraint";
        .msgflags.text="Remove messages based on the values of following flags.";
        .msgflags.seen.text="Seen:";
        .msgflags.deleted.text="Deleted:";
        .msgflags.vals=["and","or"];
        .msgflags.labels=["and any constraints","or any constraints"];
        
        .usrheader.title="Header constraint";
        .usrheader.text="Enter custom header value(s) separated by commas.";
        
        
    };
    content=[
	{
	    ctrl=pane;
	    layout=[ybox];
	    content=[
		{
		    ctrl=pane;
		    content=[
			{
			    ctrl=label;
			    id=namelabel;
			    text=$.name.text;
			    wrap=$g.label.size0;
			    aligny=0.5;
			},
			{
			    ctrl=text;
			    label=namelabel;
			    val=$name;
			    aligny=0.5;
			    focus=true;
			},
			{
			    ctrl=hglue;
			}
		    ]
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=label;
		    id=targetlabel;
		    text=$.target.text;
		    wrap=$g.label.size4;
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=text;
		    label=targetlabel;
		    val=$Folderpattern;
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=togglepane;
		    text=$.exclusive.text;
		    val=$Exclusive;
		    content=[
			{
			    ctrl=label;
			    text=$.exclusive.help;
			    wrap=$g.label.size5;
			    candisable=false;
			},
			{
			    ctrl=hglue;
			}
		    ]
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=togglepane;
		    layout=[ybox];
		    text=$.folder.title;
		    val=$.folder.flag;
		    content=[
			{
			    ctrl=label;
			    text=$.sizelimit.text;
			    wrap=$g.label.size5;
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=numlabel;
				    text=$.num.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=number;
				    label=numlabel;
				    val=$Messagecount;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=sizelabel;
				    text=$.size.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=number;
				    label=sizelabel;
				    val=$Foldersizebytes;
				    items=[kb,mb];
				    labels=$.size.labels;
				    unit=byte;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			}
		    ]
		},
		{
		    ctrl=vstrut;
		},
		{
		    ctrl=togglepane;
		    layout=[ybox];
		    text=$.msgage.text;
		    val=$.msgage.flag;
		    content=[
			{
			    ctrl=label;
			    text=$.agelimit.text;
			    wrap=$g.label.size5;
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=dayslabel;
				    text=$.days.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=number;
				    label=dayslabel;
				    val=$Messagedays;
				    labels=$.days.labels;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			}
		    ]
		},
		{
		    ctrl=togglepane;
		    layout=[ybox];
		    text=$.msgsize.title;
		    val=$.msgsize.flag;
		    content=[
			{
			    ctrl=label;
			    text=$.msizelimit.text;
			    wrap=$g.label.size5;
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=msgsizelabel;
				    text=$.msgsize.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=number;
				    label=msgsizelabel;
				    val=$Messagesize;
				    items=[kb,mb];
				    labels=$.msgsize.labels;
				    unit=byte;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=sizedaylabel;
				    text=$.sizeday.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=number;
				    label=sizedaylabel;
				    val=$Messagesizedays;
				    labels=$.sizeday.labels;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			}

		    ]
		},
                { /** message flags pane **/
                    ctrl=togglepane;
                    layout=[ybox];
                    text=$.msgflags.title;
                    val=$.msgflags.flag;
                    content=[
                        {
                            ctrl=label;
                            text=$.msgflags.text;
                            wrap=$g.label.size5;
                        },
                        {
                            ctrl=vstrut;
                        },
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=seenlabel;
				    text=$.msgflags.seen.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=choice;
				    label=seenlabel;
				    labels=$.msgflags.labels;
				    items=$.msgflags.vals;
				    
				    val=$Seen;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=pane;
			    content=[
				{
				    ctrl=label;
				    id=deletedlabel;
				    text=$.msgflags.deleted.text;
				    wrap=$g.label.size1;
				    aligny=0.5;
				},
				{
				    ctrl=rigid;
				},
				{
				    ctrl=choice;
				    label=deletedlabel;
				    labels=$.msgflags.labels;
				    items=$.msgflags.vals;
				    val=$Deleted;
				    aligny=0.5;
				    allowempty=true;
				},
				{
				    ctrl=hglue;
				}
			    ]
			}			
                        
  		    ]
		},
		{ /** user-defined constraint pane **/
		    ctrl=togglepane;
		    layout=[ybox];
		    text=$.usrheader.title;
		    val=$.usrheader.flag;
		    content=[
		 	{			
			    ctrl=label;
			    id=usrheaderlabel;
			    text=$.usrheader.text;
			    wrap=$g.label.size4;
			},
			{
			    ctrl=vstrut;
			},
			{
			    ctrl=text;
			    label=usrheaderlabel;
			    val=$Usrheader;
			},   
			{
			    ctrl=hglue;
			}		    

		    ]
		},

		{
		    ctrl=vstrut;
		}
	    ]
	}
    ]
}
]
