Created
April 13, 2011 05:39
-
-
Save bshaffer/917017 to your computer and use it in GitHub Desktop.
(expanded from 3 partials)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php use_stylesheets_for_form($form) ?> | |
<?php use_javascripts_for_form($form) ?> | |
<div class="sf_admin_form"> | |
<?php echo form_tag_for($form, '@sf_guard_user_sf_guard_user_old') ?> | |
<?php echo $form->renderHiddenFields(false) ?> | |
<?php if ($form->hasGlobalErrors()): ?> | |
<?php echo $form->renderGlobalErrors() ?> | |
<?php endif; ?> | |
<?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?> | |
<fieldset id="sf_fieldset_<?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?>"> | |
<?php if ('NONE' != $fieldset): ?> | |
<h2><?php echo __($fieldset, array(), 'messages') ?></h2> | |
<?php endif; ?> | |
<?php foreach ($fields as $name => $field): ?> | |
<?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?> | |
<?php $attributes = $field->getConfig('attributes', array()) ?> | |
<?php $label = $field->getConfig('label') ?> | |
<?php $help = $field->getConfig('help') ?> | |
<?php $class = 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name ?> | |
<?php if ($field->isPartial()): ?> | |
<?php include_partial('sf_guard_user_old/'.$name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?> | |
<?php elseif ($field->isComponent()): ?> | |
<?php include_component('sf_guard_user_old', $name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?> | |
<?php else: ?> | |
<div class="<?php echo $class ?><?php $form[$name]->hasError() and print ' errors' ?>"> | |
<?php echo $form[$name]->renderError() ?> | |
<div> | |
<?php echo $form[$name]->renderLabel($label) ?> | |
<div class="content"><?php echo $form[$name]->render($attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes) ?></div> | |
<?php if ($help): ?> | |
<div class="help"><?php echo __($help, array(), 'messages') ?></div> | |
<?php elseif ($help = $form[$name]->renderHelp()): ?> | |
<div class="help"><?php echo $help ?></div> | |
<?php endif; ?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</fieldset> | |
<?php endforeach; ?> | |
<ul class="sf_admin_actions"> | |
<?php if ($form->isNew()): ?> | |
<?php echo $helper->linkToDelete($form->getObject(), array( 'params' => array( ), 'confirm' => 'Are you sure?', 'class_suffix' => 'delete', 'label' => 'Delete',)) ?> | |
<?php echo $helper->linkToList(array( 'params' => array( ), 'class_suffix' => 'list', 'label' => 'Back to list',)) ?> | |
<?php echo $helper->linkToSave($form->getObject(), array( 'params' => array( ), 'class_suffix' => 'save', 'label' => 'Save',)) ?> | |
<?php echo $helper->linkToSaveAndAdd($form->getObject(), array( 'params' => array( ), 'class_suffix' => 'save_and_add', 'label' => 'Save and add',)) ?> | |
<?php else: ?> | |
<?php echo $helper->linkToDelete($form->getObject(), array( 'params' => array( ), 'confirm' => 'Are you sure?', 'class_suffix' => 'delete', 'label' => 'Delete',)) ?> | |
<?php echo $helper->linkToList(array( 'params' => array( ), 'class_suffix' => 'list', 'label' => 'Back to list',)) ?> | |
<?php echo $helper->linkToSave($form->getObject(), array( 'params' => array( ), 'class_suffix' => 'save', 'label' => 'Save',)) ?> | |
<?php echo $helper->linkToSaveAndAdd($form->getObject(), array( 'params' => array( ), 'class_suffix' => 'save_and_add', 'label' => 'Save and add',)) ?> | |
<?php endif; ?> | |
</ul> | |
</form> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment