Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit e9f9d17

Browse files
author
Michael Grauer
committed
BUG: refs #0282. Correctly setting type of assetstore upon creation.
1 parent ad00473 commit e9f9d17

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/controllers/AssetstoreController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function addAction()
159159
$assetstoreDao = new AssetstoreDao();
160160
$assetstoreDao->setName($form->name->getValue());
161161
$assetstoreDao->setPath($form->basedirectory->getValue());
162-
$assetstoreDao->setType($form->type->getValue());
162+
$assetstoreDao->setType($form->assetstoretype->getValue());
163163
$this->Assetstore->save($assetstoreDao);
164164

165165
echo json_encode(array('msg' => 'The assetstore has been added.',

core/controllers/forms/AssetstoreForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function createAssetstoreForm($action = 'assetstore/add')
4949
// Amazon support is not yet implemented, don't present it as an option
5050
// '2' => $this->t('Amazon S3'));
5151

52-
$assetstoretype = new Zend_Form_Element_Select('type', array('id' => 'assetstoretype'));
52+
$assetstoretype = new Zend_Form_Element_Select('assetstoretype', array('id' => 'assetstoretype'));
5353
$assetstoretype->setLabel('Select a type')->setMultiOptions($assetstoretypes);
5454
// Add a loading image
5555
$assetstoretype->setDescription('<div class="assetstoreLoading" style="display:none"><img src="'.$this->webroot.'/core/public/images/icons/loading.gif"/></div>')

core/public/js/import/import.index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function assetstoreSubmit(formData, jqForm, options)
130130
{
131131
// Add the type is the one in the main page (because it's hidden in the assetstore add page)
132132
var assetstoretype = new Object();
133-
assetstoretype.name = 'type';
133+
assetstoretype.name = 'assetstoretype';
134134
assetstoretype.value = $("#importassetstoretype").val();
135135
formData.push(assetstoretype);
136136
$(".assetstoreLoading").show();

0 commit comments

Comments
 (0)