fix form variable not defined error
Cette révision appartient à :
Parent
46c105362d
révision
ba476185d3
|
@ -31,9 +31,9 @@ var Modal = {
|
|||
// Get the button that opens the modal
|
||||
if (!btn) {
|
||||
btn = document.getElementById("modal_btn_" + modal.id)
|
||||
} else if (btn.match(/^#/)) {
|
||||
} else if (btn instanceof String && btn.match(/^#/)) {
|
||||
btn = document.getElementById(btn.substr(1));
|
||||
} else if (btn.match(/^\./)) {
|
||||
} else if (btn instanceof String && btn.match(/^\./)) {
|
||||
btn = document.getElementsByClassName(btn.substr(1));
|
||||
isBtnArray = true;
|
||||
} else if (btn instanceof Array) {
|
||||
|
|
|
@ -210,14 +210,14 @@
|
|||
{{ yield csrf_field() }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="tag">{{ T("tag")}}</label>
|
||||
<input type="text" id="tag" name="tag" class="form-input up-input" value="{{Form.Tag}}" required/>
|
||||
<input type="text" id="tag" name="tag" class="form-input up-input" value="" required/>
|
||||
{{ yield errors(name="Tag")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="type">{{ T("tagtype")}}</label>
|
||||
<select name="type" id="type" class="form-input up-input">
|
||||
{{ range _, type := Config.Torrents.Tags.Types }}
|
||||
<option value="{{ type }}" {{if Form.Type == type }}selected{{end}}>{{T("tagtype_" + type) }}</option>
|
||||
<option value="{{ type }}">{{T("tagtype_" + type) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ yield errors(name="Type")}}
|
||||
|
@ -237,8 +237,10 @@
|
|||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/modal.js") }}"></script>
|
||||
{{ if User.ID > 0 }}
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/query.js") }}"></script>
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/templates.js") }}"></script>
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/template.js") }}"></script>
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/translation.js") }}"></script>
|
||||
<script type="text/javascript">
|
||||
// {{ range _, type := Config.Torrents.Tags.Types }}
|
||||
T.Add("tagtype_{{ type }}", '{{ T("tagtype_" + type) }}')
|
||||
|
@ -282,3 +284,4 @@ document.querySelector("#modal_tag_form form").addEventListener("submit", functi
|
|||
})
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Référencer dans un nouveau ticket