1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

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.
This commit is contained in:
Tom Piccirello 2018-11-18 22:44:27 -05:00 committed by Thomas Piccirello
parent a57a026f4c
commit 2d7138839d
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@
<div class="formRow"> <div class="formRow">
<label for="start_torrent" class="leftLabelLarge">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <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="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>
<div class="formRow"> <div class="formRow">
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
@ -84,7 +84,7 @@
}); });
$('start_torrent').addEventListener('change', function() { $('start_torrent').addEventListener('change', function() {
$('add_paused').disabled = $('start_torrent').checked; $('add_paused').value = !$('start_torrent').checked;
}); });
</script> </script>
<div id="download_spinner" class="mochaSpinner"></div> <div id="download_spinner" class="mochaSpinner"></div>

View File

@ -32,7 +32,7 @@
<div class="formRow"> <div class="formRow">
<label for="start_torrent" class="leftLabelLarge">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <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="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>
<div class="formRow"> <div class="formRow">
<label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <label for="skip_checking" class="leftLabelLarge">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
@ -77,7 +77,7 @@
}); });
$('start_torrent').addEventListener('change', function() { $('start_torrent').addEventListener('change', function() {
$('add_paused').disabled = $('start_torrent').checked; $('add_paused').value = !$('start_torrent').checked;
}); });
</script> </script>
<div id="upload_spinner" class="mochaSpinner"></div> <div id="upload_spinner" class="mochaSpinner"></div>