Author: david
Date: Wed Aug 31 13:45:24 2011
New Revision: 9646
Log:
Drop upload_dir from UI - the setting has never been used
Modified:
trunk/apps/qubit/modules/settings/actions/listAction.class.php
trunk/lib/form/SettingsGlobalForm.class.php
Modified: trunk/apps/qubit/modules/settings/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/settings/actions/listAction.class.php Wed Aug
31 13:30:32 2011 (r9645)
+++ trunk/apps/qubit/modules/settings/actions/listAction.class.php Wed Aug
31 13:45:24 2011 (r9646)
@@ -76,13 +76,12 @@
// Global settings form submission
if (null !== $request->global_settings)
{
- // Hack to populate "version" and "upload_dir" fields so they display
+ // Hack to populate "version" field so it displays
// if validation fails. By default, their values are not included in
// $request->parameterHolder (and thus are not bound) because their
// <input> field is disabled.
$version = (null !== $setting =
QubitSetting::getSettingByName('version')) ?
$setting->getValue(array('sourceCulture'=>true)) : null;
- $uploadDir = (null !== $setting =
QubitSetting::getSettingByName('upload_dir')) ?
$setting->getValue(array('sourceCulture'=>true)) : null;
- $this->globalForm->bind(array_merge($request->global_settings,
array('version'=>$version, 'upload_dir'=>$uploadDir)));
+ $this->globalForm->bind(array_merge($request->global_settings,
array('version'=>$version)));
if ($this->globalForm->isValid())
{
// Do update and redirect to avoid repeat submit wackiness
@@ -193,7 +192,6 @@
}
$checkForUpdates = QubitSetting::getSettingByName('check_for_updates');
- $uploadDir = QubitSetting::getSettingByName('upload_dir');
$refImageMaxWidth =
QubitSetting::getSettingByName('reference_image_maxwidth');
$hitsPerPage = QubitSetting::getSettingByName('hits_per_page');
$accessionMask = QubitSetting::getSettingByName('accession_mask');
@@ -211,7 +209,6 @@
$this->globalForm->setDefaults(array(
'version' => $version,
'check_for_updates' => (isset($checkForUpdates)) ?
intval($checkForUpdates->getValue(array('sourceCulture'=>true))) : 1,
- 'upload_dir' => (isset($uploadDir)) ?
$uploadDir->getValue(array('sourceCulture'=>true)) : null,
'reference_image_maxwidth' => (isset($refImageMaxWidth)) ?
$refImageMaxWidth->getValue(array('sourceCulture'=>true)) : null,
'hits_per_page' => (isset($hitsPerPage)) ?
$hitsPerPage->getValue(array('sourceCulture'=>true)) : null,
'accession_mask' => (isset($accessionMask)) ?
$accessionMask->getValue(array('sourceCulture'=>true)) : null,
Modified: trunk/lib/form/SettingsGlobalForm.class.php
==============================================================================
--- trunk/lib/form/SettingsGlobalForm.class.php Wed Aug 31 13:30:32 2011
(r9645)
+++ trunk/lib/form/SettingsGlobalForm.class.php Wed Aug 31 13:45:24 2011
(r9646)
@@ -41,7 +41,6 @@
$this->setWidgets(array(
'version' => new sfWidgetFormInput(array(), array('class'=>'disabled',
'disabled'=>true)),
'check_for_updates' => new
sfWidgetFormSelectRadio(array('choices'=>array(1=>'yes', 0=>'no')),
array('class'=>'radio')),
- 'upload_dir' => new sfWidgetFormInput(array(),
array('class'=>'disabled', 'disabled'=>true)),
'reference_image_maxwidth' => new sfWidgetFormInput,
'hits_per_page' => new sfWidgetFormInput,
'accession_mask' => new sfWidgetFormInput,
@@ -60,7 +59,6 @@
$this->widgetSchema->setLabels(array(
'version' => __('Application version'),
'check_for_updates' => __('Check for updates'),
- 'upload_dir' => __('Upload directory'),
'reference_image_maxwidth' => __('Maximum image width (pixels)'),
'hits_per_page' => __('Results per page'),
'accession_mask' => __('Accession mask'),
@@ -79,7 +77,6 @@
$this->widgetSchema->setHelps(array(
'version' => __('The current version of the application'),
'check_for_updates' => __('Enable automatic update notification'),
- 'upload_dir' => __('The destination directory for uploaded digital
object files'),
'reference_image_maxwidth' => __('The maximum width for derived
reference images'),
'hits_per_page' => __('The number of records shown per page on list
pages'),
// 'accession_mask' => __(''),
@@ -124,7 +121,6 @@
$this->validatorSchema['version'] = new sfValidatorString(array('required'
=> false));
$this->validatorSchema['check_for_updates'] = new
sfValidatorString(array('required' => false));
- $this->validatorSchema['upload_dir'] = new
sfValidatorString(array('required' => false));
$this->validatorSchema['accession_mask'] = new
sfValidatorString(array('required' => false));
$this->validatorSchema['separator_character'] = new
sfValidatorString(array('required' => false));
$this->validatorSchema['accession_counter'] = new
sfValidatorInteger(array('required' => false));
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.