diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/forms/photos/admin/settings.php (renamed from views/default/forms/tidypics/admin/settings.php) | 0 | ||||
-rw-r--r-- | views/default/forms/photos/ajax_upload.php (renamed from views/default/forms/tidypics/ajax_upload.php) | 0 | ||||
-rw-r--r-- | views/default/forms/photos/album/save.php | 48 | ||||
-rw-r--r-- | views/default/forms/photos/basic_upload.php (renamed from views/default/forms/tidypics/basic_upload.php) | 0 | ||||
-rw-r--r-- | views/default/tidypics/forms/edit.php | 125 |
5 files changed, 48 insertions, 125 deletions
diff --git a/views/default/forms/tidypics/admin/settings.php b/views/default/forms/photos/admin/settings.php index 06b3f4cb9..06b3f4cb9 100644 --- a/views/default/forms/tidypics/admin/settings.php +++ b/views/default/forms/photos/admin/settings.php diff --git a/views/default/forms/tidypics/ajax_upload.php b/views/default/forms/photos/ajax_upload.php index a1d13e80b..a1d13e80b 100644 --- a/views/default/forms/tidypics/ajax_upload.php +++ b/views/default/forms/photos/ajax_upload.php diff --git a/views/default/forms/photos/album/save.php b/views/default/forms/photos/album/save.php new file mode 100644 index 000000000..8a1202c07 --- /dev/null +++ b/views/default/forms/photos/album/save.php @@ -0,0 +1,48 @@ +<?php +/** + * Save album form body + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +$title = elgg_extract('title', $vars, ''); +$description = elgg_extract('description', $vars, ''); +$tags = elgg_extract('tags', $vars, ''); +$access_id = elgg_extract('access_id', $vars, get_default_access()); +$container_guid = elgg_extract('container_guid', $vars, elgg_get_page_owner_guid()); +$guid = elgg_extract('guid', $vars, 0); + +?> + +<div> + <label><?php echo elgg_echo('album:title'); ?></label> + <?php echo elgg_view('input/text', array('name' => 'title', 'value' => $title)); ?> +</div> +<div> + <label><?php echo elgg_echo('album:desc'); ?></label> + <?php echo elgg_view('input/longtext', array('name' => 'description', 'value' => $description)); ?> +</div> +<div> + <label><?php echo elgg_echo('tags'); ?></label> + <?php echo elgg_view('input/tags', array('name' => 'tags', 'value' => $tags)); ?> +</div> +<?php + +$categories = elgg_view('input/categories', $vars); +if ($categories) { + echo $categories; +} + +?> +<div> + <label><?php echo elgg_echo('access'); ?></label> + <?php echo elgg_view('input/access', array('name' => 'access_id', 'value' => $access_id)); ?> +</div> +<div class="elgg-foot"> +<?php +echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $guid)); +echo elgg_view('input/hidden', array('name' => 'container_guid', 'value' => $container_guid)); +echo elgg_view('input/submit', array('value' => elgg_echo('save'))); +?> +</div> diff --git a/views/default/forms/tidypics/basic_upload.php b/views/default/forms/photos/basic_upload.php index 55ab854a4..55ab854a4 100644 --- a/views/default/forms/tidypics/basic_upload.php +++ b/views/default/forms/photos/basic_upload.php diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php deleted file mode 100644 index 8e2bd9bcc..000000000 --- a/views/default/tidypics/forms/edit.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * Tidypics images edit/add form - * This form is used to: - * - create albums - * - edit albums - * - edit images - */ - -//set stuff if we are editing existing album or image -if (isset($vars['entity'])) { - $action = "tidypics/edit"; - $title = $vars['entity']->title; - $body = $vars['entity']->description; - $tags = $vars['entity']->tags; - $access_id = $vars['entity']->access_id; - $subtype = $vars['subtype']; - - // if nothing is sent, create new, but only new albums are sent here - // new images are sent to upload.php -} else { - $action = "tidypics/addalbum"; - $tags = ""; - $title = ""; - $body = ""; - $access_id = ACCESS_DEFAULT; - $subtype = 'album'; - - $title = $_SESSION['tidypicstitle']; - $body = $_SESSION['tidypicsbody']; - $tags = $_SESSION['tidypicstags']; - - unset($_SESSION['tidypicstitle']); - unset($_SESSION['tidypicsbody']); - unset($_SESSION['tidypicstags']); -} - -// group or individual -$container_guid = page_owner(); - -?> -<div class="contentWrapper"> - <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post"> - <p> - <label><?php echo elgg_echo('album:title'); ?></label> - <?php echo elgg_view("input/text", array("internalname" => "tidypicstitle", "value" => $title,)); ?> - </p> - <?php - if ($subtype == 'album') { - ?> - <p> - <label><?php echo elgg_echo('album:desc'); ?></label> - <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,)); ?> - </p> - <?php - } else { - ?> - <p> - <label><?php echo elgg_echo('caption'); ?></label> - <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?> - </p> - <?php - } - ?> - <p> - <label><?php echo elgg_echo("tags"); ?></label> - <?php echo elgg_view("input/tags", array( "internalname" => "tidypicstags","value" => $tags,)); ?> - </p> - - <?php - if ($subtype == 'image') { - $container_guid = $vars['entity']->container_guid; - - // should this image be the cover for the album - only ask for non-cover photos - // determine if it is already the cover - $img_guid = $vars['entity']->guid; - $album = get_entity($container_guid); - $cover_guid = $album->getCoverImageGuid(); - - if ($cover_guid != $img_guid) { - - ?> - <p> - <?php echo elgg_view('input/checkboxes', array('internalname' => "cover", - 'options' => array(elgg_echo("album:cover")), - )); - ?> - </p> - <?php - } - - } else { - // album so display access control - - $categories = elgg_view('categories',$vars); - if (!empty($categories)) { - ?> - <p> - <?php echo $categories; ?> - </p> - - <?php - } - ?> - <p> - <label><?php echo elgg_echo('access'); ?></label> - <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?> - </p> - - <?php - } - - if (isset($vars['entity'])) { - ?> - <input type="hidden" name="guid" value="<?php echo $vars['entity']->getGUID(); ?>" /> - <?php - } - - echo elgg_view('input/securitytoken'); - ?> - <input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" /> - <input type="hidden" name="subtype" value="<?php echo $subtype; ?>" /> - <p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p> - </form> -</div>
\ No newline at end of file |