Browse Source

Fix WebUI bug on override of Start Download option

Disabled form values aren't submitted, causing the add_paused value not to be sent when Start Torrent was checked. qBittorrent would then fall back to the global Start Download preference.

Closes #9855.
adaptive-webui-19844
Tom Piccirello 6 years ago committed by Thomas Piccirello
parent
commit
2d7138839d
  1. 4
      src/webui/www/private/download.html
  2. 4
      src/webui/www/private/upload.html

4
src/webui/www/private/download.html

@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
<div class="formRow">
<label for="start_torrent" class="leftLabelLarge">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
<input type="checkbox" id="start_torrent" checked="checked" />
<input type="hidden" id="add_paused" name="paused" value="true" disabled="disabled" />
<input type="hidden" id="add_paused" name="paused" value="false" readonly />
</div>
<div class="formRow">
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
});
$('start_torrent').addEventListener('change', function() {
$('add_paused').disabled = $('start_torrent').checked;
$('add_paused').value = !$('start_torrent').checked;
});
</script>
<div id="download_spinner" class="mochaSpinner"></div>

4
src/webui/www/private/upload.html

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
<div class="formRow">
<label for="start_torrent" class="leftLabelLarge">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
<input type="checkbox" id="start_torrent" checked="checked" />
<input type="hidden" id="add_paused" name="paused" value="true" disabled="disabled" />
<input type="hidden" id="add_paused" name="paused" value="false" readonly />
</div>
<div class="formRow">
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
});
$('start_torrent').addEventListener('change', function() {
$('add_paused').disabled = $('start_torrent').checked;
$('add_paused').value = !$('start_torrent').checked;
});
</script>
<div id="upload_spinner" class="mochaSpinner"></div>

Loading…
Cancel
Save