1 -# Coquelicot: "one-click" file sharing with a focus on users' privacy.
2 -# Copyright © 2010-2012 potager.org <jardiniers@potager.org>
3 -# © 2011 mh / immerda.ch <mh+coquelicot@immerda.ch>
5 -# This program is free software: you can redistribute it and/or modify
6 -# it under the terms of the GNU Affero General Public License as
7 -# published by the Free Software Foundation, either version 3 of the
8 -# License, or (at your option) any later version.
10 -# This program is distributed in the hope that it will be useful,
11 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -# GNU Affero General Public License for more details.
15 -# You should have received a copy of the GNU Affero General Public License
16 -# along with this program. If not, see <http://www.gnu.org/licenses/>.
19 $(document).ready(addLinkToPasswordGenerator);
20 $(document).ready(authenticate);
24 %form#upload{ :enctype => 'multipart/form-data',
25 :action => 'upload', :method => 'post' }
26 #upload-authentication
27 - unless settings.about_text.empty?
28 %p.about= settings.about_text
29 %script{ :type => 'text/javascript', :src => "javascripts/coquelicot.auth.#{auth_method}.js" }
30 = render :haml, :"auth/#{auth_method}", :layout => false
32 %label{ :for => 'file' } File:
33 %input.input{ :type => 'file', :id => 'file', :name => 'file' }
35 %label{ :for => 'expire' } Available for:
36 %select.input{ :id => 'expire',:name => 'expire' }
37 %option{ :value => 5 } 5 minutes
38 %option{ :value => 60 } 1 hour
39 %option{ :value => 60 * 24 } 1 day
40 %option{ :value => 60 * 24 * 7 } 1 week
41 %option{ :value => 60 * 24 * 30 } 1 month
45 %input{ :type => 'radio', :id => 'any_number', :name => 'one_time', :value => '', :checked => 'checked' }
46 %label{ :for => 'any_number' } Unlimited downloads until expiration
48 %input{ :type => 'radio', :id => 'one_time', :name => 'one_time', :value => 'true' }
49 %label{ :for => 'one_time' } Remove after one download
51 %label{ :for => 'file_key' } Download password:
52 %input.input{ :type => 'password', :id => 'file_key', :name => 'file_key' }
55 %input.submit{ :type => 'submit', :value => _('Share!') }