diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-10 07:00:44 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-10 07:00:44 -0500 |
commit | b46b9b1464249916d105ee46f0bdb7972863070d (patch) | |
tree | a701f32991b386b7d0e664f279182449ec3cbb9d /views | |
parent | 0fe5af64cf1f5d69e0253e27dec70e346814fcdf (diff) | |
download | elgg-b46b9b1464249916d105ee46f0bdb7972863070d.tar.gz elgg-b46b9b1464249916d105ee46f0bdb7972863070d.tar.bz2 |
moved upload forms to new location
Diffstat (limited to 'views')
-rw-r--r-- | views/default/forms/tidypics/ajax_upload.php (renamed from views/default/tidypics/forms/ajax_upload.php) | 6 | ||||
-rw-r--r-- | views/default/forms/tidypics/basic_upload.php (renamed from views/default/tidypics/forms/upload.php) | 19 | ||||
-rw-r--r-- | views/default/tidypics/forms/setupFlickr.php | 45 |
3 files changed, 15 insertions, 55 deletions
diff --git a/views/default/tidypics/forms/ajax_upload.php b/views/default/forms/tidypics/ajax_upload.php index 4a7a05c0c..a1d13e80b 100644 --- a/views/default/tidypics/forms/ajax_upload.php +++ b/views/default/forms/tidypics/ajax_upload.php @@ -1,4 +1,9 @@ <?php +/** + * Tidypics ajax upload form body + * + * @uses $vars['album'] + */ elgg_extend_view('metatags', 'tidypics/js/uploader'); @@ -134,4 +139,3 @@ $("#uploadify").uploadify({ }); </script> - diff --git a/views/default/tidypics/forms/upload.php b/views/default/forms/tidypics/basic_upload.php index 8bbda08b3..55ab854a4 100644 --- a/views/default/tidypics/forms/upload.php +++ b/views/default/forms/tidypics/basic_upload.php @@ -1,7 +1,14 @@ <?php -global $CONFIG; +/** + * Tidypics basic uploader form + * + * This only handled uploading the images. Editing the titles and descriptions + * are handled with the edit forms. + * + * @uses $vars['album'] + */ -//this is for image uploads only. Image edits are handled by edit.php form +global $CONFIG; $album = $vars['album']; $access_id = $album->access_id; @@ -69,14 +76,8 @@ if ($quota) { </p> <?php $form_body = ob_get_clean(); +echo $form_body; -echo elgg_view('input/form', array( - 'action' => "{$vars['url']}action/tidypics/upload", - 'body' => $form_body, - 'internalid' => 'tidypicsUpload', - 'enctype' => 'multipart/form-data', - 'method' => 'post',) -); ?> </div> <script type="text/javascript"> diff --git a/views/default/tidypics/forms/setupFlickr.php b/views/default/tidypics/forms/setupFlickr.php deleted file mode 100644 index 6c461176d..000000000 --- a/views/default/tidypics/forms/setupFlickr.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -require_once( dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/lib/flickr.php"; - -$user = get_loggedin_user(); -$flickr_username = get_metadata_byname( $user->guid, "flickr_username" ); -$flickr_album_id = get_metadata_byname( $user->guid, "flickr_album_id" ); - -$action = $vars['url'] . 'admin/action/tidypics/flickrSetup'; - -$form_body = "<p>". elgg_echo( 'flickr:intro' ) . "</p><p>"; -$form_body .= elgg_echo( 'flickr:usernamesetup') . " <input style='width: 20%;' type='text' name='flickr_username' value='$flickr_username->value' ' class='input-text' /> <br />"; -$form_body .= "<input type='hidden' name='return_url' value='$_SERVER[REQUEST_URI]' />"; - -$albums = elgg_get_entities(array( - "type=" => "object", - "subtype" => "album", - "owner_guid" => $user->guid, -)); -$options = array( 0 => elgg_echo( 'flickr:selectalbum' )); -foreach( $albums as $album ) { - $title = $album->title; - switch( $album->access_id ) { - case ACCESS_PRIVATE: - $title .= " (" . elgg_echo( 'private' ) . ")"; - break; - case ACCESS_PUBLIC: - $title .= " (" . elgg_echo( 'public' ) . ")"; - break; - default: - $title .= " (no known permission set)"; - break; - } - $options[$album->guid] = $title; -} - -$form_body .= "<br />" . elgg_echo( 'flickr:albumdesc' ); -$form_body .= elgg_view('input/pulldown', array('internalname' => 'album_id', - 'options_values' => $options, - 'value' => $flickr_album_id->value )); -$form_body .= "<br />"; -$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); - -flickr_menu(); - -echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); |