e62ebb05ba
* Mass Edit MOD api JS (WIP) In continuity with the mass edit mod api, this is the javascript use of it. ##What does it do? * Delete of multiple torrents on index/search * Category change of multiple torrents * Change of owner of multiple torrents * Lock & delete of multiple torrents ##How? * New toolbar only visible for mods * Checkboxes added only for mods * Selection and click on the button in toolbar * Nothing is submitted, you have to review the changes in a modal window listing them. * Then the ajax queries are initialized one at a time with a progression bar * You can always at any moment delete entries from the queuing list * Improved progress bar * Deleting part almost done Improved modal design All dom interactions should be done Prepared Query for only one callback Improved Modal to keep a link to the active modal * Finished =D Added some translation string * Forgot the refreshing of the page Just an option that can be disabled by making refreshTimeout to 0
53 lignes
2,8 Kio
HTML
53 lignes
2,8 Kio
HTML
{{define "title"}}Torrent Edit Panel{{end}}
|
||
{{define "content"}}
|
||
{{with .Form}}
|
||
<form enctype="multipart/form-data" role="upload" method="POST">
|
||
{{ block "csrf_field" $ }}{{end}}
|
||
{{ range (index $.FormInfos "infos")}}
|
||
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
|
||
{{end}}
|
||
{{ range (index $.FormErrors "errors")}}
|
||
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
|
||
{{end}}
|
||
<div class="form-group">
|
||
<label for="name">{{call $.T "name"}}</label>
|
||
<input type="text" name="name" class="form-control" placeholder="{{call $.T "file_name"}}" value="{{.Name}}" required>
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="c">{{call $.T "category"}}</label>
|
||
<select name="c" class="form-control input-sm">
|
||
<option value="">{{call $.T "select_a_torrent_category"}}</option>
|
||
{{ range $name_cat, $id_cat := (GetCategories false) }}
|
||
<option value="{{ $id_cat }}" {{if eq $.Form.Category $id_cat }}selected{{end}}>{{call $.T $name_cat }}</option>
|
||
{{ end }}
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="Status">{{call $.T "torrent_status"}}</label>
|
||
<select name="status" class="form-control input-sm">
|
||
<option value="5" {{if eq .Status 5}}selected{{end}}>{{ call $.T "torrent_status_blocked" }}</option>
|
||
<option value="1" {{if eq .Status 1}}selected{{end}}>{{call $.T "torrent_status_normal"}}</option>
|
||
<option value="2" {{if eq .Status 2}}selected{{end}}>{{call $.T "torrent_status_remake"}}</option>
|
||
<option value="3" {{if eq .Status 3}}selected{{end}}>{{call $.T "trusted"}}</option>
|
||
<option value="4" {{if eq .Status 4}}selected{{end}}>A+</option>
|
||
</select>
|
||
</div>
|
||
{{ if $.User }}
|
||
<p>
|
||
<input type="checkbox" name="hidden" id="hidden" {{ if .Hidden }}checked{{end}}>
|
||
<label for="hidden">{{call $.T "mark_as_hidden"}}</label>
|
||
</p>
|
||
{{ end }}
|
||
<div class="form-group">
|
||
<label for="website_link">{{call $.T "website_link"}}</label>
|
||
<input name="website_link" id="website_link" class="form-control" type="text" value="{{.WebsiteLink}}">
|
||
</div>
|
||
<div class="form-group">
|
||
<label for="desc">{{call $.T "torrent_description"}}</label>
|
||
<p class="help-block">{{call $.T "description_markdown_notice"}}</p>
|
||
<textarea name="desc" class="form-control" rows="10">{{.Description}}</textarea>
|
||
</div>
|
||
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
|
||
</form>
|
||
{{end}}
|
||
{{end}}
|