<?php echo form_tag('photo/save', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
)) ?>

<?php echo object_input_hidden_tag($photo, 'getId') ?>

<fieldset id="sf_fieldset_none" class="">

<div class="form-row">
  <?php echo label_for('photo[photo]', __($labels['photo{photo}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('photo{photo}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('photo{photo}')): ?>
    <?php echo form_error('photo{photo}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = get_partial('photo', array('type' => 'edit', 'photo' => $photo)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('photo[file_path]', __($labels['photo{file_path}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('photo{file_path}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('photo{file_path}')): ?>
    <?php echo form_error('photo{file_path}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_admin_input_file_tag($photo, 'getFilePath', array (
  'control_name' => 'photo[file_path]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

<div class="form-row">
  <?php echo label_for('photo[description]', __($labels['photo{description}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('photo{description}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('photo{description}')): ?>
    <?php echo form_error('photo{description}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_textarea_tag($photo, 'getDescription', array (
  'size' => '30x3',
  'control_name' => 'photo[description]',
)); echo $value ? $value : '&nbsp;' ?>
    </div>
</div>

</fieldset>

<?php include_partial('edit_actions', array('photo' => $photo)) ?>

</form>

<ul class="sf_admin_actions">
      <li class="float-left"><?php if ($photo->getId()): ?>
<?php echo button_to(__('delete'), 'photo/delete?id='.$photo->getId(), array (
  'post' => true,
  'confirm' => __('Are you sure?'),
  'class' => 'sf_admin_action_delete',
)) ?><?php endif; ?>
</li>
  </ul>
