/** * Shows the edit/enter info form for one photo. * * @param mixed $this The photo to be edited. */ function showPhotoEditForm() { global $current_user; //if we have post values (common info) we take those instead of db value. $descr = attribute_escape($_POST['img_descr']) ? attribute_escape(stripslashes($_POST['img_descr'])) : $this->getDescription(); $tags = attribute_escape($_POST['tags_input']) ? attribute_escape(stripslashes($_POST['tags_input'])) : $this->getTagString(); $selectedAuthor = attribute_escape($_POST['img_author']) ? attribute_escape(stripslashes($_POST['img_author'])) : $this->getAuthor(); $fullSizeUrl = PhotoQHelper::getRelUrlFromPath($this->getPath()); // output photo information form $path = $this->getAdminThumbURL($this->_oc->getValue('photoQAdminThumbs-Width'), $this->_oc->getValue('photoQAdminThumbs-Height')); $authors = get_editable_user_ids($current_user->id); ?> <div class="main info_group"> <div class="info_unit"><a class="img_link" href="<?php echo $fullSizeUrl; ?> " title="Click to see full-size photo" target="_blank"><img src='<?php echo $path; ?> ' alt='<?php echo $this->getName(); ?> ' /></a></div> <div class="info_unit"><label><?php _e('Title', 'PhotoQ'); ?> :</label><br /><input type="text" name="img_title[]" size="30" value="<?php echo $this->getTitle(); ?> " /></div> <div class="info_unit"><label><?php _e('Description', 'PhotoQ'); ?> :</label><br /><textarea style="font-size:small;" name="img_descr[]" cols="30" rows="3"><?php echo $descr; ?> </textarea></div> <?php //this makes it retro-compatible if (function_exists('get_tags_to_edit')) { ?> <div class="info_unit"><label><?php _e('Tags (separate multiple tags with commas: cats, pet food, dogs)', 'PhotoQ'); ?> :</label><br /><input type="text" name="tags_input[]" class="tags-input" size="50" value="<?php echo $tags; ?> " /></div> <?php } ?> <div class="info_unit"><label><?php _e('Slug', 'PhotoQ'); ?> :</label><br /><input type="text" name="img_slug[]" size="30" value="<?php echo $this->getSlug(); ?> " /></div> <div class="info_unit"><label><?php _e('Post Author', 'PhotoQ'); ?> :</label><?php wp_dropdown_users(array('include' => $authors, 'name' => 'img_author[]', 'multi' => true, 'selected' => $selectedAuthor)); ?> </div> <input type="hidden" name="img_id[]" value="<?php echo $this->getId(); ?> " /> <input type="hidden" name="img_position[]" value="<?php echo $this->getPosition(); ?> " /> </div> <?php PhotoQHelper::showMetaFieldList($this->getId()); ?> <div class="wimpq_cats info_group"><?php PhotoQHelper::showCategoryCheckboxList($this->getId(), $this->_oc->getValue('qPostDefaultCat'), $this->getSelectedCats()); ?> </div> <div class="clr"></div> <?php }
?> <div class="info_unit"><label><?php _e('Post Author', 'PhotoQ'); ?> :</label><?php wp_dropdown_users(array('include' => $authors, 'name' => 'img_author', 'selected' => $user_ID)); ?> </div> </div> <?php PhotoQHelper::showMetaFieldList(); ?> <div class="wimpq_cats info_group"> <?php PhotoQHelper::showCategoryCheckboxList(); ?> </div> <br class="clr" /> <?php $submitLabel = isset($_POST['ftp_upload']) ? __('Import/Enter Info »', 'PhotoQ') : __('Enter Info »', 'PhotoQ'); ?> <p style="float: right" class="infobutton"> <input type="submit" class="button-primary action" name="edit_batch" value="<?php echo $submitLabel; ?> " /> </p> </div> <?php