Ignore:
Timestamp:
Feb 15, 2010, 11:23:02 PM (14 years ago)
Author:
plg
Message:

feature 1438: switch between uploadify and HTML form

feature 1435 related: change the order to display the "who can see these
photos?" options. It's just a test, we're discussing about usability on this
field.

graphical design: distinguish the 3 main fields (category/privacy/files), no
use of the table anymore to have a smaller width. One goal was to see the
"Upload" button when the form opens for the first time in a 1024x768 browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/upload_form/upload.php

    r4887 r4895  
    344344  );
    345345
     346$upload_modes = array('html', 'multiple');
     347
     348$upload_mode = 'multiple';
     349$upload_switch = 'html';
     350if (isset($_GET['upload_mode']) and in_array($_GET['upload_mode'], $upload_modes))
     351{
     352  $index_of_upload_mode = array_flip($upload_modes);
     353  $upload_mode_index = $index_of_upload_mode[ $_GET['upload_mode'] ];
     354
     355  $upload_mode = $_GET['upload_mode'];
     356  $upload_switch = $upload_modes[ ($upload_mode_index + 1) % 2 ];
     357}
     358
    346359$template->assign(
    347360    array(
    348       'upload_mode' => 'multiple',
     361      'upload_mode' => $upload_mode,
     362      'switch_url' => $admin_base_url.'&upload_mode='.$upload_switch,
    349363      'upload_id' => md5(rand()),
    350364      'session_id' => session_id(),
     
    394408// image level options
    395409$tpl_options = array();
    396 foreach ($conf['available_permission_levels'] as $level)
     410foreach (array_reverse($conf['available_permission_levels']) as $level)
    397411{
    398412  $label = null;
     
    423437    }
    424438   
    425     $label = implode(', ', array_reverse($labels));
     439    $label = implode(', ', $labels);
    426440  }
    427441  $tpl_options[$level] = $label;
Note: See TracChangeset for help on using the changeset viewer.