can add a new list item using the template.

set a default item template

working on sql to get a table with unified columns for file md and manually entered metadata without a file.
This commit is contained in:
Naomi 2013-07-30 19:24:05 -04:00
parent 06e21029d0
commit 7ca3048f36
13 changed files with 456 additions and 163 deletions

View file

@ -173,13 +173,17 @@ class Application_Form_EditHistoryItem extends Zend_Form
));
}
public function createFromTemplate($template) {
public function createFromTemplate($template, $required) {
$templateSubForm = $this->getSubForm(self::ID_PREFIX.'template');
for ($i = 0, $len = count($template); $i < $len; $i++) {
$item = $template[$i];
//don't dynamically add this as it should be included in the init() function already.
if (in_array($item["name"], $required)) {
continue;
}
$formElType = $this->formElTypes[$item[self::ITEM_TYPE]];