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:
parent
ee5677f376
commit
ea6a957c05
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user