Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Make forms look a little better (#885)

Cette révision appartient à :
kipukun 2017-06-02 16:35:42 -04:00 révisé par akuma06
Parent 22b0f9f01e
révision 1365f18398
2 fichiers modifiés avec 12 ajouts et 12 suppressions

Voir le fichier

@ -3,21 +3,21 @@
<div class="results box">
<h3 id="torrents">{{ call $.T "torrent_edit_panel" }}</h3>
{{with .Form}}
<form enctype="multipart/form-data" role="upload" method="POST">
<form style="text-align:left;padding-left:10px;padding-right:10px;" 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>
<p class="success-text">{{ . }}</p>
{{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>
<p class="error-text">{{ . }}</p>
{{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>
<input type="text" name="name" class="form-input up-input" 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">
<select name="c" class="form-input up-input">
<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>
@ -26,7 +26,7 @@
</div>
<div class="form-group">
<label for="Status">{{call $.T "torrent_status"}}</label>
<select name="status" class="form-control input-sm">
<select name="status" class="form-input up-input">
<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>
@ -42,14 +42,14 @@
{{ 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}}">
<input name="website_link" id="website_link" class="form-input up-input" 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>
<textarea name="desc" class="form-input up-input" rows="10">{{.Description}}</textarea>
</div>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
<button type="submit" class="form-input up-input">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}

Voir le fichier

@ -15,7 +15,7 @@
{{with .Form}}
<div class="form-group">
<label for="to">{{ call $.T "reassign_to" }}</label>
<input type="text" name="to" class="form-control" placeholder="{{ call $.T "user_id" }}" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
<input class="form-input" type="text" name="to" class="form-control" placeholder="{{ call $.T "user_id" }}" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
</div>
<div class="form-group">
<label for="by">{{ call $.T "reassign_based_on" }}</label><br />
@ -25,12 +25,12 @@
<div class="form-group">
<p>{{call $.T "reassign_indication"}}</p>
<textarea rows="20" cols="40" name="data">{{.Data}}</textarea>
<textarea class="form-input" rows="20" cols="40" name="data">{{.Data}}</textarea>
</div>
{{end}}
<p>{{ call $.T "reassign_warning_2" }}</p>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
<button type="submit" class="form-input">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}