1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-01 05:49:58 +00:00

Changed mulitple books upload to single button

This commit is contained in:
OzzieIsaacs 2018-03-26 20:50:04 +02:00
parent ee5677f376
commit ea6a957c05

View File

@ -55,20 +55,11 @@
<ul class="nav navbar-nav navbar-right" id="main-nav"> <ul class="nav navbar-nav navbar-right" id="main-nav">
{% if g.user.is_authenticated or g.user.is_anonymous %} {% if g.user.is_authenticated or g.user.is_anonymous %}
{% if g.user.role_upload() or g.user.role_admin()%} {% if g.user.role_upload() or g.user.role_admin()%}
{% if g.allow_upload %}
<li>
<form id="form-upload-multi" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
<div class="form-group">
<span class="btn btn-default btn-file">{{_('Upload')}} multiple books<input id="btn-upload-multi" name="btn-upload" type="file" multiple></span>
</div>
</form>
</li>
{% endif %}
{% if g.allow_upload %} {% if g.allow_upload %}
<li> <li>
<form id="form-upload" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data"> <form id="form-upload" class="navbar-form" action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
<div class="form-group"> <div class="form-group">
<span class="btn btn-default btn-file">{{_('Upload')}} a single book<input id="btn-upload" name="btn-upload" type="file"></span> <span class="btn btn-default btn-file">{{_('Upload')}}<input id="btn-upload" name="btn-upload" type="file" multiple></span>
</div> </div>
</form> </form>
</li> </li>
@ -246,10 +237,6 @@
$("#loader").show(); $("#loader").show();
$("#form-upload").submit(); $("#form-upload").submit();
}); });
$("#btn-upload-multi").change(function () {
$("#loader").show();
$("#form-upload-multi").submit();
});
}); });
</script> </script>