array_Elements = array();
}
function AddRegex($name,$string,$value,$conn)
{
$arr = array();
$arr['name'] = $name;
$arr['string'] = $string;
$arr['value'] = $value;
$arr['connAlpha'] = $conn; // Connect with alphabet select
$this->array_Regexes[] = $arr;
}
function MultiSelectWindow($config){
$this->config = $config;
$this->SaveButtonString = _("Save");
$this->CloseButtonString = _("Close");
}
function SetTitle($str){
$this->string_Title = $str;
}
function SetListHeader($str){
$this->string_ListHeader = $str;
}
function SetSummary($str){
$this->string_Summary = $str;
}
function SetSaveButtonString($str){
$this->SaveButtonString = $str;
}
function SetCloseButtonString($str){
$this->CloseButtonString = $str;
}
function SetInformation($str){
$this->string_Information = $str;
}
function EnableAplhabet($bool){
$this->bool_DisplayAlpahabet = $bool;
}
function AddHeader($arr){
$this->array_Header[] = $arr;
}
function AddElement($arr){
$this->array_Elements[] = $arr;
}
function AddCheckBox($name,$value,$string,$default){
$arr = array();
$arr['name'] = $name;
$arr['string'] = $string;
$arr['value'] = $value;
$arr['default'] = $default;
$this->array_Checkboxes[] = $arr;
}
function isClosed()
{
return($this->is_closed);
}
function EnableCloseButton($bool)
{
$this->bool_DisplayCloseButton = $bool;
}
function EnableSaveButton ($bool)
{
$this->bool_DisplaySaveButton = $bool;
}
function Draw()
{
$smarty = get_smarty();
$divlist = new divlist($this->string_Title);
$divlist->SetSummary($this->string_Summary);
$divlist->SetEntriesPerPage(0); // 0 for scrollable list
/* set Header informations
*/
$header = array();
foreach($this->array_Header as $head){
$header[] = $head;
}
$divlist->SetHeader($header);
/* set Entries
*/
$elements = array();
foreach($this->array_Elements as $element){
$divlist->AddEntry($element);
}
/* Create checkboxes fields
*/
$boxes = "";
$boxClick = " onClick='document.mainform.submit();' ";
foreach($this->array_Checkboxes as $box){
if($box['default'] == true){
$boxes .=" ".$box['string']."
";
}else{
$boxes .=" ".$box['string']."
";
}
}
$smarty->assign("CheckBoxes", $boxes);
/* Assign regex fields
*/
$regexes = "";
foreach($this->array_Regexes as $regex){
$regexes.="