<?php

// distinguish between add and edit
$isEdit = false;
if (strpos($this->params['action'], 'edit') !== false) {
    $isEdit = true;
}

$category = array(
    'diefy'=>'Diefy',
    'key'=>'Key',
    'trans'=>'Transcended'
    );

if ($isEdit) {
    if (!empty($this->data['Attribute'])) {
        echo $this->Form->input('Attribute.id', array('value'=>$this->data['Attribute']['id']));
    }
    echo $this->Form->input('Attribute.ally_id', array('type' => 'hidden', 'value' => $this->data['Ally']['id']));
    echo $this->Form->input('Attribute.category', array('type'=>'select', 'options'=>$category));
}
    