| 13 | | echo $html->tag('div', |
| 14 | | $form->label('Tags.text', __('Tags', true)). |
| 15 | | $ajax->autoComplete('Tags.text', 'autocomplete/tag', array('value' => implode(', ', Set::extract('/Tag/name', $data)), 'tokens' => ',')), |
| 16 | | array('class' => 'input text')); |
| 17 | | echo $html->tag('div', |
| 18 | | $form->label('Categories.text', __('Categories', true)). |
| 19 | | $ajax->autoComplete('Categories.text', 'autocomplete/category', array('value' => implode(', ', Set::extract('/Category/name', $data)), 'tokens' => ',')), |
| 20 | | array('class' => 'input text')); |
| 21 | | echo $html->tag('div', |
| 22 | | $form->label('Locations.city', __('City', true)). |
| 23 | | $ajax->autoComplete('Locations.city', 'autocomplete/city', array('value' => $locations[LOCATION_CITY])), |
| 24 | | array('class' => 'input text')); |
| 25 | | echo $html->tag('div', |
| 26 | | $form->label('Locations.sublocation', __('Sublocation', true)). |
| 27 | | $ajax->autoComplete('Locations.sublocation', 'autocomplete/sublocation', array('value' => $locations[LOCATION_SUBLOCATION])), |
| 28 | | array('class' => 'input text')); |
| 29 | | echo $html->tag('div', |
| 30 | | $form->label('Locations.state', __('State', true)). |
| 31 | | $ajax->autoComplete('Locations.state', 'autocomplete/state', array('value' => $locations[LOCATION_STATE])), |
| 32 | | array('class' => 'input text')); |
| 33 | | echo $html->tag('div', |
| 34 | | $form->label('Locations.country', __('Country', true)). |
| 35 | | $ajax->autoComplete('Locations.country', 'autocomplete/country', array('value' => $locations[LOCATION_COUNTRY])), |
| 36 | | array('class' => 'input text')); |
| 37 | | if ($data['Media']['latitude'] || $data['Media']['longitude']) { |
| 38 | | $geo = $data['Media']['latitude'].', '.$data['Media']['longitude']; |
| 39 | | } else { |
| 40 | | $geo = ''; |
| 41 | | } |
| 42 | | echo $form->input('Media.geo', array('value' => $geo, 'label' => __('Geo data', true))); |
| | 8 | echo $form->input('Tags.text', array('label' => __('Tags', true), 'value' => join(', ', Set::extract('/Tag/name', $data)))); |
| | 9 | echo $autocomplete->autoComplete('Tags.text', 'autocomplete/tag', array('split' => true)); |
| | 10 | echo $form->input('Categories.text', array('label' => __('Categories', true), 'value' => join(', ', Set::extract('/Category/name', $data)))); |
| | 11 | echo $autocomplete->autoComplete('Categories.text', 'autocomplete/category', array('split' => true)); |
| | 12 | echo $form->input('Locations.city', array('label' => __('City', true), 'value' => join('', Set::extract('/Location[type='.LOCATION_CITY.']/name', $data)))); |
| | 13 | echo $autocomplete->autoComplete('Locations.city', 'autocomplete/city'); |
| | 14 | echo $form->input('Locations.sublocation', array('label' => __('Sublocation', true), 'value' => join('', Set::extract('/Location[type='.LOCATION_SUBLOCATION.']/name', $data)))); |
| | 15 | echo $autocomplete->autoComplete('Locations.sublocation', 'autocomplete/sublocation'); |
| | 16 | echo $form->input('Locations.state', array('label' => __('State', true), 'value' => join('', Set::extract('/Location[type='.LOCATION_STATE.']/name', $data)))); |
| | 17 | echo $autocomplete->autoComplete('Locations.state', 'autocomplete/state'); |
| | 18 | echo $form->input('Locations.country', array('label' => __('Country', true), 'value' => join('', Set::extract('/Location[type='.LOCATION_COUNTRY.']/name', $data)))); |
| | 19 | echo $autocomplete->autoComplete('Locations.country', 'autocomplete/country'); |
| | 20 | echo $form->input('Media.geo', array('label' => __('Geo data', true), 'maxlength' => 32)); |