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