Skip to content

Commit

Permalink
Fixed issue #08038 : with urlFormat to "get" : Can't upload file in t…
Browse files Browse the repository at this point in the history
…emplate editor

Dev: add css and js file uploadable in template editor : a user can register external js file, then let him upload it
  • Loading branch information
Shnoulle committed Jul 30, 2013
1 parent bd728f2 commit 2f6b4ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/config/config-defaults.php
Expand Up @@ -84,7 +84,7 @@
$config['userideditable'] = 'N'; // Allow editing of user IDs
$config['defaulttemplate'] = 'default'; // This setting specifys the default theme used for the 'public list' of surveys

$config['allowedtemplateuploads'] = 'gif,ico,jpg,png'; // File types allowed to be uploaded in the templates section.
$config['allowedtemplateuploads'] = 'gif,ico,jpg,png,css,js'; // File types allowed to be uploaded in the templates section.

$config['allowedresourcesuploads'] = '7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,ico,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xml,zip,pstpl,css,js'; // File types allowed to be uploaded in the resources sections, and with the HTML Editor

Expand Down
12 changes: 6 additions & 6 deletions application/views/admin/templates/templatesummary_view.php
Expand Up @@ -9,14 +9,14 @@
<div class='header'>
<?php echo sprintf($clang->gT("Editing template '%s' - File '%s'"),$templatename,$editfile); ?>
</div>
<div id='templateleft' style="float:left;padding-left:1em;width:12%;">
<div >
<div id='templateleft' style="float:left;width:12%;">
<div style="padding-left:1em;">
<?php $clang->eT("Standard files:"); ?><br>
<select size='6' name='editfile' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/fileredirect/templatename/".$templatename."/screenname/".urlencode($screenname)); ?>/editfile/'+escape(this.value), '_top')">
<?php echo makeoptions($files, "name", "name", $editfile); ?>
</select>
</div>
<div style='margin-top:1em;'>
<div style='margin-top:1em;padding-left:1em;'>
<?php $clang->eT("CSS & Javascript files:"); ?>
<br/><select size='8' name='cssfiles' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/fileredirect/templatename/".$templatename."/screenname/".urlencode($screenname)); ?>/editfile/'+escape(this.value), '_top')">
<?php echo makeoptions($cssfiles, "name", "name", $editfile); ?>
Expand Down Expand Up @@ -53,7 +53,7 @@
</form>
</div>

<div style="float:left;">
<div style="float:left;width:12%;">
<div>
<?php $clang->eT("Other files:"); ?>
<?php echo CHtml::form(array('admin/templates/sa/templatefiledelete'), 'post'); ?>
Expand All @@ -68,8 +68,8 @@
</form>
</div>
<div style='margin-top:1em;'>
<?php echo CHtml::form(array('admin/templates/uploadfile'), 'post', array('id'=>'importtemplatefile', 'name'=>'importtemplatefile', 'enctype'=>'multipart/form-data')); ?>
<?php $clang->eT("Upload a file:"); ?><br><input style='width:50px;' size=10 name='upload_file' id="upload_file" type="file" /><br />
<?php echo CHtml::form(array('admin/templates/sa/uploadfile'), 'post', array('id'=>'importtemplatefile', 'name'=>'importtemplatefile', 'enctype'=>'multipart/form-data')); ?>
<?php $clang->eT("Upload a file:"); ?><br><input name='upload_file' id="upload_file" type="file" required="required"/><br />
<input type='submit' value='<?php $clang->eT("Upload"); ?>'
<?php if (!is_template_editable($templatename)) { ?>
disabled='disabled'
Expand Down

0 comments on commit 2f6b4ae

Please sign in to comment.