Skip to content

Commit

Permalink
Merge pull request #1763 from Oha-you/bug/uploads
Browse files Browse the repository at this point in the history
(Fix) Set IMDB to zero by default, don't check it in js
  • Loading branch information
HDVinnie authored May 18, 2021
2 parents deafed7 + f483748 commit ced574e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/js/unit3d/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class uploadExtensionBuilder {
let tmdb = document.querySelector('#autotmdb');
let imdb = document.querySelector('#autoimdb');

if (!name.value.trim() && !tmdb.value.trim() && !imdb.value.trim()) {
if (!name.value.trim() && !tmdb.value.trim()) {
let torrent = document.querySelector('#torrent');
let release;
if (!name.value) {
Expand Down
9 changes: 8 additions & 1 deletion resources/views/torrent/upload.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@
<div class="form-group">
<label for="name">IMDB ID <b>(@lang('torrent.optional'))</b></label>
<label>
<input type="number" name="imdb" id="autoimdb" class="form-control" value="{{ !empty($imdb) ? $imdb : old('imdb') }}" required>
@php $imdb_val = 0;
if (!empty($imdb)) {
$imdb_val = $imdb;
}
if (!empty(old('imdb'))) {
$imdb_val = old('imdb');
} @endphp
<input type="number" name="imdb" id="autoimdb" class="form-control" value="{{ $imdb_val }}">
</label>
</div>
@else
Expand Down

0 comments on commit ced574e

Please sign in to comment.