Example #1
0
 /**
  * Create the wizard
  * 
  * @return object Wizard
  * @access public
  * @since 6/4/08
  */
 public function createWizard()
 {
     $wizard = SimpleWizard::withText("\n<h2>" . dgettext("polyphony", "Visitor Registration") . "</h2>" . "\n<p>" . dgettext("polyphony", "Please fill out the form below. After you click the 'Register' button an email will be sent with a link to confirm your registration. You must confirm your registration before you will be able to log in.") . "</p>" . "\n<table class='visitor_registration'>" . "\n\t<tr>\n\t\t<th>" . dgettext("polyphony", "EMail Address:<br/>(This is your login handle)") . "</th>\n\t\t<td>[[email]]</td>\n\t</tr>" . "\n\t<tr>\n\t\t<th>" . dgettext("polyphony", "Full Name:") . "</th>\n\t\t<td>[[name]]</td>\n\t</tr>" . "\n\t<tr>\n\t\t<th>" . dgettext("polyphony", "Password:"******"<br/>" . dgettext("polyphony", "Password Again:") . "</th>\n\t\t<td>[[password]]</td>\n\t</tr>" . "\n</table>" . "\n[[captcha]]" . "\n<table width='100%' border='0' style='margin-top:20px' >\n" . "<tr>\n" . "</td>\n" . "<td align='left' width='50%'>\n" . "[[_cancel]]" . "<td align='right' width='50%'>\n" . "[[_save]]" . "</td></tr></table>");
     $property = $wizard->addComponent("email", new WTextField());
     $property->setStartingDisplayText(dgettext("polyphony", "*****@*****.**"));
     $property->setErrorText(dgettext("polyphony", "A valid email address is required."));
     $property->setErrorRule(new WECNonZeroRegex("^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\\-+)|([A-Za-z0-9]+\\.+)|([A-Za-z0-9]+\\++))*[A-Za-z0-9]+@((\\w+\\-+)|(\\w+\\.))*\\w{1,63}\\.[a-zA-Z]{2,6}\$"));
     $property = $wizard->addComponent("name", new WTextField());
     $property->setStartingDisplayText(dgettext("polyphony", "John Doe"));
     $property->setErrorText(dgettext("polyphony", "A value for this field is required - allowed characters: letters, spaces, ,.'-."));
     $property->setErrorRule(new WECNonZeroRegex("^[\\w\\040,\\.'-]{3,}\$"));
     $property = $wizard->addComponent("password", new WPasswordPair());
     $property->setErrorText(dgettext("polyphony", "Passwords must be between 8 and 100 characters."));
     $property->setErrorRule(new WECNonZeroRegex("^.{8,100}\$"));
     if (!defined('RECAPTCHA_PUBLIC_KEY')) {
         throw new ConfigurationErrorException("RECAPTCHA_PUBLIC_KEY not defined.");
     }
     if (!defined('RECAPTCHA_PRIVATE_KEY')) {
         throw new ConfigurationErrorException("RECAPTCHA_PRIVATE_KEY not defined.");
     }
     $property = $wizard->addComponent("captcha", new WReCaptcha(RECAPTCHA_PUBLIC_KEY, RECAPTCHA_PRIVATE_KEY));
     $wizard->addComponent("_save", WSaveButton::withLabel("Register"));
     $wizard->addComponent("_cancel", new WCancelButton());
     return $wizard;
 }
Example #2
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * @access public
  * @since 7/18/05
  */
 function createWizard()
 {
     $wizard = SimpleWizard::withText("<table border='0' style='margin-top:20px' >\n" . "\n<tr><td><h3>" . _("File type:") . "</h3></td></tr>" . "\n<tr><td>" . _("The type of file to be imported: ") . "</td>" . "\n<td>[[file_type]]</td></tr>" . "\n<tr><td>" . _("Is this file an archive? ") . "</td>" . "\n<td>[[is_archived]]</td></tr>" . "\n<tr><td><h3>" . _("Import type:") . "</h3></td></tr>" . "\n<tr><td>" . _("The type of import to execute: ") . "</td>" . "\n<td>[[import_type]]</td></tr>" . "\n<tr><td><h3>" . _("File:") . "</h3></td></tr>" . "\n<tr><td>" . _("The file to be imported: ") . "</td>" . "\n<td>[[filename]]</td>" . "<tr>\n" . "<td align='left'>\n" . "[[_cancel]]" . "</td>\n" . "<td align='right'>\n" . "[[_save]]" . "</td></tr></table>");
     // :: Name and Description ::
     //$step =$wizard->addStep("fileupload", new WizardStep());
     //$step->setDisplayName(_("Archive Type and File Upload"));
     $select = $wizard->addComponent("file_type", new WSelectList());
     //		$select->addOption("Tab-Delimited", "Tab-Delimited");
     $select->addOption("XML", "XML");
     //		$select->addOption("Exif", "Exif");
     //		$select->setValue("Tab-Delimited");
     $archive = $wizard->addComponent("is_archived", WCheckBox::withLabel("is Archived"));
     $type = $wizard->addComponent("import_type", new WSelectList());
     //		$type->addOption("update", "update");
     // need exceptions for nodes not existing
     $type->addOption("insert", "insert");
     //$type->addOption("replace", "replace");
     $fileField = $wizard->addComponent("filename", new WFileUploadField());
     $save = $wizard->addComponent("_save", WSaveButton::withLabel("Import"));
     $cancel = $wizard->addComponent("_cancel", new WCancelButton());
     //$fileField->setErrorText("<nobr>"._("A value for this field is required.")."</nobr>");
     //$fileField->setErrorRule(new WECNonZeroRegex("[\\w]+"));
     return $wizard;
 }
Example #3
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * 
  * @return object Wizard
  * @access public
  * @since 9/28/05
  */
 function createWizard()
 {
     // Instantiate the wizard
     $wizard = SimpleWizard::withText("\n<h3>" . _("Click <em>Export</em> to Export Concerto") . "</h3>" . "\n<br/>" . _("The current content of concerto will be exported and presented as an archive for download.  Once the archive is downloaded click <em>Cancel</em> to go back.") . "\n<br/><h3>" . _("Archive:") . "</h3>" . "<table border='0' style='margin-top:20px' >\n" . "\n<tr><td>" . _("Archive Name: ") . "</td>" . "<td>[[filepath]]</td></tr>" . "\n<tr><td>" . _("Compression: ") . "</td>" . "<td>[[compression]]</td></tr>" . "<tr>\n" . "<td align='left'>\n" . "[[_cancel]]" . "</td>\n" . "<td align='right'>\n" . "[[_save]]" . "</td></tr></table>");
     // Create the properties.
     $fileNameProp = $wizard->addComponent("filepath", new WTextField());
     // 		$datefield =$wizard->addComponent("effective_date", new WTextField());
     // 		$date = DateAndTime::Now();
     // 		$datefield->setValue($date->asString());
     //
     // 		$date2field =$wizard->addComponent("expiration_date", new WTextField());
     //
     // 		if (is_object($date2))
     // 			$date2field->setValue($date->asString());
     $type = $wizard->addComponent("compression", new WSelectList());
     $type->setValue(".tar.gz");
     $type->addOption(".tar.gz", _("gzip"));
     //  		$type->addOption(".zip", _("zip"));
     //  		$type->addOption(".bz2", _("bz2"));
     $save = $wizard->addComponent("_save", WSaveButton::withLabel("Export"));
     $cancel = $wizard->addComponent("_cancel", new WCancelButton());
     return $wizard;
 }
Example #4
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * @access public
  * @since 7/18/05
  */
 function createWizard()
 {
     $harmoni = Harmoni::Instance();
     $wizard = SimpleWizard::withText("<table border='0' style='margin-top:20px' >\n" . "\n<tr><td><h3>" . _("Source data type:") . "</h3></td>" . "\n<td style='font-size: small;'>" . "* Please see the <strong>Help</strong> below for more information." . "</td></tr>" . "\n<tr><td>" . _("The format of data to be imported: ") . "</td>" . "\n<td>[[file_type]]</td></tr>" . "\n<tr><td>" . _("Is this file a Zip/GZip/BZip/Tar archive?<br/>If checked, the archive will be decompressed and all files in it will be imported.") . "</td>" . "\n<td>[[is_archived]]</td></tr>" . "\n<tr><td><h3>" . _("Import type:") . "</h3></td></tr>" . "\n<tr><td>" . _("The type of import to execute: ") . "</td>" . "\n<td>[[import_type]]</td></tr>" . "\n<tr><td><h3>" . _("File:") . "</h3></td></tr>" . "\n<tr><td>" . _("The Zip/GZip/BZip/Tar/XML achive file or a single file to be imported: ") . "</td>" . "\n<td>[[filename]]</td></tr>" . "\n<tr><td><h3>" . _("Parent Asset:") . "</h3></td></tr>" . "\n<tr><td>" . _("If specified, all Assets imported will be placed below this parent. ") . "</td>" . "\n<td>[[parent]]</td></tr>" . "<tr>\n" . "<td align='left'>\n" . "[[_cancel]]" . "</td>\n" . "<td align='right'>\n" . "[[_save]]" . "</td></tr></table>");
     $select = $wizard->addComponent("file_type", new WSelectList());
     $select->addOption("XML", "XML");
     $select->addOption("Tab-Delimited", "Tab-Delimited");
     $select->addOption("Exif", "Exif");
     $select->addOption("FilesOnly", "Files Only (no metadata)");
     $select->setValue("FilesOnly");
     $archive = $wizard->addComponent("is_archived", WCheckBox::withLabel("is Archived"));
     $archive->setChecked(true);
     $type = $wizard->addComponent("import_type", new WSelectList());
     //		$type->addOption("update", "update");
     // need exceptions for nodes not existing
     $type->addOption("insert", "insert");
     //$type->addOption("replace", "replace");
     $fileField = $wizard->addComponent("filename", new WFileUploadField());
     $parent = $wizard->addComponent("parent", new WSelectList());
     $parent->addOption("", "none");
     $rootAssets = $this->getRootAssets();
     while ($rootAssets->hasNext()) {
         $this->addAssetOption($parent, $rootAssets->next());
     }
     if (RequestContext::value('parent')) {
         $parent->setValue(RequestContext::value('parent'));
     }
     $save = $wizard->addComponent("_save", WSaveButton::withLabel("Import"));
     $cancel = $wizard->addComponent("_cancel", new WCancelButton());
     //$fileField->setErrorText("<nobr>"._("A value for this field is required.")."</nobr>");
     //$fileField->setErrorRule(new WECNonZeroRegex("[\\w]+"));
     return $wizard;
 }
Example #5
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * 
  * @return object Wizard
  * @access public
  * @since 9/28/05
  */
 function createWizard()
 {
     $harmoni = Harmoni::Instance();
     $idManager = Services::getService("Id");
     $repositoryManager = Services::getService("Repository");
     $repository = $repositoryManager->getRepository($idManager->getId($harmoni->request->get("collection_id")));
     // Instantiate the wizard, then add our steps.
     $wizard = SimpleWizard::withText("\n<h3>" . _("Click <em>Export</em> to Export the <em>") . $repository->getDisplayName() . _("</em> Collection out of <em>Concerto</em>") . "</h3>" . "\n<br/>" . _("The current content of <em>") . $repository->getDisplayName() . _("</em> will be exported and presented as an archive for download.  Once the archive is downloaded click <em>Cancel</em> to go back.") . "\n<br/><h3>" . _("Archive:") . "</h3>" . "<table border='0' style='margin-top:20px' >\n" . "\n<tr><td>" . _("Archive Name: ") . "</td>" . "<td>[[filepath]]</td></tr>" . "\n<tr><td>" . _("Compression: ") . "</td>" . "<td>[[compression]]</td></tr>" . "<tr>\n" . "<td align='left'>\n" . "[[_cancel]]" . "</td>\n" . "<td align='right'>\n" . "[[_save]]" . "</td></tr></table>");
     // Create the properties.
     $fileNameProp = $wizard->addComponent("filepath", new WTextField());
     //		$fileNameProp->setErrorText("<nobr>"._("The archive name must not have an extension")."</nobr>");
     // 		$fileNameProp->setErrorRule(new WECRegex("\."));
     $type = $wizard->addComponent("compression", new WSelectList());
     $type->setValue(".tar.gz");
     $type->addOption(".tar.gz", _("gzip"));
     //  		$type->addOption(".zip", _("zip"));
     //  		$type->addOption(".bz2", _("bz2"));
     $save = $wizard->addComponent("_save", WSaveButton::withLabel("Export"));
     $cancel = $wizard->addComponent("_cancel", new WCancelButton());
     return $wizard;
 }
 /**
  * Returns the values of wizard-components. Should return an array if children are involved,
  * otherwise a whatever type of object is expected.
  * @access public
  * @return mixed
  */
 function getAllValues()
 {
     $values = parent::getAllValues();
     return $values['_steps'];
 }
Example #7
0
    }
}
include_once './class/textsanitizer.php';
$myts =& TextSanitizer::getInstance();
if (isset($_POST)) {
    foreach ($_POST as $k => $v) {
        ${$k} = $myts->stripSlashesGPC($v);
    }
}
include_once './include/functions.php';
$language = getLanguage();
include_once './language/' . $language . '/install.php';
define('_OKIMG', '<img src="img/yes.gif" width="6" height="12" border="0" alt="OK" /> ');
define('_NGIMG', '<img src="img/no.gif" width="6" height="12" border="0" alt="NG" /> ');
include_once './class/simplewizard.php';
$wizard = new SimpleWizard();
$wizard->setBaseTemplate('./install_tpl.php');
$wizard->setTemplatePath('./templates');
$wizardSeq = new SimpleWizardSequence();
$wizardSeq->add('langselect', _INSTALL_L0, 'start', _INSTALL_L80);
$wizardSeq->add('start', _INSTALL_L0, 'modcheck', _INSTALL_L81);
$wizardSeq->add('modcheck', _INSTALL_L82, 'dbform', _INSTALL_L89);
$wizardSeq->add('dbform', _INSTALL_L90, 'dbconfirm', _INSTALL_L91);
$wizardSeq->add('dbconfirm', _INSTALL_L53, 'dbsave', _INSTALL_L92, '', _INSTALL_L93);
$wizardSeq->add('dbsave', _INSTALL_L92, 'mainfile', _INSTALL_L94);
$wizardSeq->add('mainfile', _INSTALL_L94, 'initial', _INSTALL_L102, 'start', _INSTALL_L103, true);
$wizardSeq->add('initial', _INSTALL_L102, 'checkDB', _INSTALL_L104, 'start', _INSTALL_L103, true);
$wizardSeq->add('checkDB', _INSTALL_L104, 'createDB', _INSTALL_L105, 'start', _INSTALL_L103, true);
$wizardSeq->add('createDB', _INSTALL_L105, 'checkDB', _INSTALL_L104);
$wizardSeq->add('createTables', _INSTALL_L40, 'siteInit', _INSTALL_L112);
$wizardSeq->add('siteInit', _INSTALL_L112, 'insertData', _INSTALL_L116);
Example #8
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * 
  * @return object Wizard
  * @access public
  * @since 10/23/07
  */
 function createWizard()
 {
     $repository = $this->getRepository();
     // Instantiate the wizard, then add our steps.
     $wizard = SimpleWizard::withText("<div>\n" . "[[cancel]]\n" . "</div>\n" . "<hr/>\n" . "<div>[[file]]</div>" . "<div>[[asset_kind]]</div>" . "\n");
     $wizard->addComponent("cancel", new WCancelButton());
     $file = $wizard->addComponent("file", new WFileUploadField());
     $file->setStartingDisplay(_("Choose a file"), 0);
     $assetKind = $wizard->addComponent("asset_kind", new WSaveWithChoiceButtonList());
     $assetKind->addOption("from_file", _("Create From File &raquo;"), "<br/><br/>");
     $assetKind->addOption("generic", _("Create a generic Asset &raquo;"));
     $parent = $wizard->addComponent("parent", new WHiddenField());
     if (RequestContext::value("parent")) {
         $parent->setValue(RequestContext::value("parent"));
     }
     return $wizard;
 }
Example #9
0
 /**
  * Create a new Wizard for this action. Caching of this Wizard is handled by
  * {@link getWizard()} and does not need to be implemented here.
  * 
  * @return object Wizard
  * @access public
  * @since 4/28/05
  */
 function createWizard()
 {
     // Instantiate the wizard, then add our steps.
     ob_start();
     print "<h2>" . _("Create Group") . "</h2>";
     print "<b>" . _("Display name") . "</b>: [[display_name]]<br/>";
     print "<b>" . _("Description") . " (" . _("optional") . ")" . "</b>: <br/>[[description]] <br/>";
     print "<b>" . _("Type") . "</b>: [[type]] (" . _("or use fields below to create a new type") . ")<br/>";
     print "<br/>";
     print "<b>" . _("Type domain") . "</b>: [[type_domain]]<br/>";
     print "<b>" . _("Type authority") . "</b>: [[type_authority]]<br/>";
     print "<b>" . _("Type keyword") . "</b>: [[type_keyword]]<br/>";
     print "<b>" . _("Type description") . "</b>:<br/> [[type_description]]<br/>";
     print "<div align='right'>[[_cancel]]\n[[_save]]</div>";
     print "[[members]]";
     if (RequestContext::value("agents") && count($list = unserialize(RequestContext::value("agents"))) > 0 && is_array($list)) {
         // print out a list of agents
         print "<div>" . _("The group will be created with the following members:") . "<ul>\n";
         $agentManager = Services::getService("Agent");
         $idManager = Services::getService("Id");
         foreach ($list as $idString) {
             $id = $idManager->getId($idString);
             if ($agentManager->isGroup($id)) {
                 $agent = $agentManager->getGroup($id);
                 $name = _("Group") . ": " . $agent->getDisplayName();
             } else {
                 if ($agentManager->isAgent($id)) {
                     $agent = $agentManager->getAgent($id);
                     $name = _("Agent") . ": " . $agent->getDisplayName();
                 }
             }
             print "<li>{$name}</li>\n";
         }
         print "</ul></div>";
     }
     $wizard = SimpleWizard::withText(ob_get_contents());
     ob_end_clean();
     // Create the properties.
     $displayNameProp = $wizard->addComponent("display_name", new WTextField());
     $displayNameProp->setErrorText(_("A value for this field is required."));
     $displayNameProp->setErrorRule(new WECNonZeroRegex("[\\w]+"));
     $descriptionProp = $wizard->addComponent("description", WTextArea::withRowsAndColumns(3, 50));
     $property = $wizard->addComponent("type", new WSelectList());
     $property->addOption("NONE", _("Use Fields Below..."));
     $agentMgr = Services::getService("Agent");
     $types = $agentMgr->getGroupTypes();
     while ($types->hasNext()) {
         $type = $types->next();
         $typeKey = urlencode(HarmoniType::typeToString($type));
         $property->addOption($typeKey, HarmoniType::typeToString($type));
     }
     $property->setValue("NONE");
     $property = $wizard->addComponent("type_domain", new WTextField());
     $property->setStartingDisplayText(_("Domain, i.e. 'groups'"));
     $property = $wizard->addComponent("type_authority", new WTextField());
     $property->setStartingDisplayText(_("Authority, i.e. 'edu.middlebury'"));
     $property = $wizard->addComponent("type_keyword", new WTextField());
     $property->setStartingDisplayText(_("Keyword, i.e 'classes"));
     $property = $wizard->addComponent("type_description", WTextArea::withRowsAndColumns(3, 50));
     $wizard->addComponent("_save", WSaveButton::withLabel(_("Create Group")));
     $wizard->addComponent("_cancel", new WCancelButton());
     $members = $wizard->addComponent("members", new WHiddenField());
     if (RequestContext::value("agents")) {
         // the members of the group to be created. an array of agent ids
         $members->setValue(RequestContext::value("agents"));
     }
     return $wizard;
 }
    function createWizard()
    {
        $list = $this->_getAgentList();
        if (count($list) > 1) {
            $string = dgettext("polyphony", "You are editing properties for multiple agents. Existing values are not displayed unless they are the same for all agents. To change a value, be sure to select the checkbox next to the field to indicate you want the field updated.");
        } else {
            $string = dgettext("polyphony", "You are editing properties for one agent. Existing values are displayed in the fields.");
        }
        $wizardText = <<<END
<div style='font-weight: bolder'>{$string}</div>

<div>
[[properties]]
</div>

<div align='right'>
[[_cancel]] [[_save]]
</div>
END;
        $wizard = SimpleWizard::withText($wizardText);
        // get a lsit of agents that cannot be edited
        $idManager = Services::getService("Id");
        $agentManager = Services::getService("Agent");
        $values = array();
        $valuesSame = array();
        $valueCount = array();
        foreach ($list as $idString) {
            $idObj = $idManager->getId($idString);
            $agent = $agentManager->getAgentOrGroup($idObj);
            $properties = $agent->getProperties();
            // put this agent's properties into an array.
            $propArray = array();
            while ($properties->hasNext()) {
                $propObj = $properties->next();
                $typeObj = $propObj->getType();
                $typeString = $typeObj->asString();
                if (!isset($propArray[$typeString])) {
                    $propArray[$typeString] = array();
                }
                $keys = $propObj->getKeys();
                while ($keys->hasNext()) {
                    $key = $keys->next();
                    $propArray[$typeString][$key] = $propObj->getProperty($key);
                }
            }
            // now go through all the keys we've seen and check if they are the same.
            $types = array_unique(array_merge(array_keys($propArray), array_keys($values)));
            foreach ($types as $typeString) {
                if (!isset($values[$typeString])) {
                    $values[$typeString] = array();
                    $valuesSame[$typeString] = array();
                    $valueCount[$typeString] = array();
                }
                if (!isset($propArray[$typeString])) {
                    $propArray[$typeString] = array();
                }
                $keys = array_unique(array_merge(array_keys($propArray[$typeString]), array_keys($values[$typeString])));
                foreach ($keys as $key) {
                    if (!isset($valueCount[$typeString][$key])) {
                        $valueCount[$typeString][$key] = 0;
                    }
                    if (!isset($values[$typeString][$key])) {
                        $valuesSame[$typeString][$key] = true;
                        $values[$typeString][$key] = $propArray[$typeString][$key];
                        $valueCount[$typeString][$key]++;
                        continue;
                    }
                    if ($valuesSame[$typeString][$key] === false) {
                        continue;
                    }
                    $theValue = isset($propArray[$typeString][$key]) ? $propArray[$typeString][$key] : null;
                    if ($theValue) {
                        $valueCount[$typeString][$key]++;
                    }
                    if ($values[$typeString][$key] != $theValue) {
                        $valuesSame[$typeString][$key] = false;
                    }
                }
            }
        }
        $wizard->addComponent("_save", WSaveButton::withLabel(dgettext("polyphony", "Update")));
        $wizard->addComponent("_cancel", new WCancelButton());
        $collection = $wizard->addComponent("properties", new WAddFromListRepeatableComponentCollection());
        $collection->setStartingNumber(0);
        $propertyManager = Services::getService("Property");
        $collection->addOptionCollection(dgettext("polyphony", "New Key..."), $value = null);
        unset($array);
        $allProperties = $propertyManager->getAllPropertyKeys();
        foreach ($allProperties as $key) {
            $collection->addOptionCollection($key, $array = array('key' => $key, 'update' => false, 'value' => ''));
            unset($array);
        }
        $keyComponent = $collection->addComponent("key", new WTextField());
        $keyComponent->setSize(15);
        $collection->addComponent("type", new WHiddenField());
        $typeText = $collection->addComponent("type_text", new WText());
        $typeText->setStyle("color: #666;");
        $valueComponent = $collection->addComponent("value", new WTextField());
        $valueComponent->setSize(40);
        if (count($list) > 1) {
            //			$valueComponent->addOnChange("alert(this.id+'_update_dummy');");
            $valueComponent->addOnChange("if (this.value != '' && this.value != '" . dgettext("polyphony", "(multiple values exist)") . "')" . "{" . "getWizardElement(this.id+'_update').value = '1';" . "getWizardElement(this.id+'_update_dummy').checked = true;" . "}");
            $collection->addComponent("value_update", new WCheckBox());
        }
        // now add the default values for all of these
        foreach (array_keys($values) as $typeString) {
            $typeArray = $values[$typeString];
            $typeSameArray = $valuesSame[$typeString];
            $typeObj = HarmoniType::fromString($typeString);
            // now the keys
            foreach (array_keys($typeArray) as $key) {
                $valuesArray = array('key' => $key, 'type' => $typeString, 'type_text' => "(" . $typeObj->getKeyword() . ")", 'update' => false, 'value' => '');
                $newSet = $collection->addValueCollection($valuesArray);
                $newSet["key"]->setEnabled(false, true);
                $newSet["key"]->setStyle("border: 0px;");
                // <-- not sure if this actually works as desired.
                // if the values are the same and there are as many values as there are agents (otherwise, some didn't have a value),
                // add the value in to the display.
                if ($typeSameArray[$key] && $valueCount[$typeString][$key] == count($list)) {
                    $newSet['value']->setValue($typeArray[$key]);
                } else {
                    $newSet['value']->setStartingDisplayText(dgettext("polyphony", "(multiple values exist)"));
                }
            }
        }
        if (count($values) == 0) {
            $collection->setStartingNumber(1);
        }
        if (count($list) > 1) {
            $collection->setElementLayout("\n<table width='100%'><tr>\n\t<td>[[value_update]]</td>\n\t<td>[[key]]</td>\n\t<td>[[type_text]]</td>\n\t<td><span style='font-weight: bolder; font-size: larger;'>=</span></td>\n\t<td align='right'>[[value]]</td>\n\t<td>[[type]]</td>\n</tr></table");
        } else {
            $collection->setElementLayout("\n<table width='100%'><tr>\n\t<td>[[key]]</td>\n\t<td>[[type_text]]</td>\n\t<td><span style='font-weight: bolder; font-size: larger;'>=</span></td>\n\t<td align='right'>[[value]]</td>\n\t<td>[[type]]</td>\n</tr></table>");
        }
        return $wizard;
    }
 /**
  * creates the wizard
  * 
  * @return object Wizard
  * @access public
  * @since 10/24/05
  */
 function createWizard()
 {
     $harmoni = Harmoni::Instance();
     $wizard = SimpleWizard::withText("\n<h2>" . dgettext("polyphony", "Old Password") . "</h2>" . "\n<br />[[old_password]]" . "\n<h2>" . dgettext("polyphony", "New Password") . "</h2>" . "\n" . dgettext("polyphony", "Please enter your new password twice") . "\n<br />[[new_password]]" . "\n<br />[[n_p_again]]" . "<table width='100%' border='0' style='margin-top:20px' >\n" . "<tr>\n" . "</td>\n" . "<td align='left' width='50%'>\n" . "[[_cancel]]" . "<td align='right' width='50%'>\n" . "[[_save]]" . "</td></tr></table>");
     $error = $harmoni->request->get("error");
     if (!is_null($error)) {
         print $error;
     }
     $pass = $wizard->addComponent("old_password", new WPasswordField());
     $pass = $wizard->addComponent("new_password", new WPasswordField());
     $pass = $wizard->addComponent("n_p_again", new WPasswordField());
     $save = $wizard->addComponent("_save", WSaveButton::withLabel("Change Password"));
     $cancel = $wizard->addComponent("_cancel", new WCancelButton());
     return $wizard;
 }