subclassing the template types, files summary table is now fully configurable form wise.

This commit is contained in:
Naomi 2013-08-12 15:06:26 -04:00
parent 5676decd2d
commit d83c004fb9
7 changed files with 345 additions and 324 deletions

View file

@ -1,3 +1,37 @@
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong" id="edit-history-file">
<?php echo $this->form; ?>
</div>
<form>
<?php $form = $this->element ?>
<dl class="zend_form">
<?php $name = "his_file_id"; ?>
<dd id="<?php echo $name;?>-element">
<?php echo $form->getElement($name); ?>
</dd>
<?php foreach ($form->getSubForm('his_file_template') as $index=>$el): ?>
<?php $name = $el->getName(); ?>
<dt id="<?php echo $name;?>-label">
<label for="<?php echo $name;?>"><?php echo $el->getLabel() ?></label>
</dt>
<dd id="<?php echo $name;?>-element">
<?php echo $el ?>
<?php if ($el->hasErrors()): ?>
<ul class='errors'>
<?php foreach($el->getMessages() as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</dd>
<?php endforeach; ?>
<dd id="submitButtons-element">
<?php foreach (array("his_file_save", "his_file_cancel") as $name): ?>
<?php echo $form->getElement($name); ?>
<?php endforeach;?>
</dd>
</dl>
</form>