BUGFIX: remote upload dialog was broken
This commit is contained in:
parent
9b3eb0d201
commit
86214989f5
|
@ -8,8 +8,13 @@
|
|||
@module Discourse
|
||||
**/
|
||||
Discourse.UploadSelectorController = Discourse.Controller.extend(Discourse.ModalFunctionality, {
|
||||
local: Em.computed.not("remote"),
|
||||
remote: Em.computed.not("allowLocal"),
|
||||
remote: Em.computed.not("local"),
|
||||
local: false,
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
this.set("local", this.get("allowLocal"));
|
||||
},
|
||||
|
||||
allowLocal: function() {
|
||||
return Discourse.SiteSettings.max_attachment_size_kb > 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="radios">
|
||||
<input type="radio" id="local" value="local" name="upload" {{action useLocal}}>
|
||||
<label class="radio" for="local">{{i18n upload_selector.from_my_computer}}</label>
|
||||
{{#if controller.local}}
|
||||
{{#if local}}
|
||||
<div class="inputs">
|
||||
<input type="file" id="filename-input"><br>
|
||||
<span class="description">{{unbound view.tip}}</span>
|
||||
|
@ -14,7 +14,7 @@
|
|||
<div class="radios">
|
||||
<input type="radio" id="remote" value="remote" name="upload" {{action useRemote}}>
|
||||
<label class="radio" for="remote">{{i18n upload_selector.from_the_web}}</label>
|
||||
{{#if controller.remote}}
|
||||
{{#if remote}}
|
||||
<div class="inputs">
|
||||
<input type="text" id="fileurl-input"><br>
|
||||
<span class="description">{{unbound view.tip}}</span>
|
||||
|
|
Loading…
Reference in New Issue