1
0
mirror of synced 2024-11-29 15:06:01 +03:00
mg-transport-telegram/templates/form.html

78 lines
3.9 KiB
HTML
Raw Normal View History

{{define "body"}}
2018-05-22 10:34:39 +03:00
<div class="row indent-top">
<div class="col s12">
2018-05-22 10:34:39 +03:00
<ul class="tabs" id="tab">
<li class="tab col s6"><a class="active" href="#tab1">{{.Locale.TabSettings}}</a></li>
<li class="tab col s6"><a class="" href="#tab2">{{.Locale.TabBots}}</a></li>
2018-05-22 10:34:39 +03:00
</ul>
</div>
<div id="tab1" class="col s12">
<div class="row indent-top">
<form id="save" class="tab-el-center" action="/save/" method="POST">
2018-05-28 18:16:13 +03:00
<input name="connectionId" type="hidden" value="{{.Conn.ID}}">
2018-05-22 10:34:39 +03:00
<div class="row">
<div class="input-field col s12">
<input placeholder="API Url" id="api_url" name="api_url" type="text" class="validate" value="{{.Conn.APIURL}}">
</div>
</div>
2018-05-22 10:34:39 +03:00
<div class="row">
<div class="input-field col s12">
<input placeholder="{{.Locale.ApiKey}}" id="api_key" name="api_key" type="text" class="validate" value="{{.Conn.APIKEY}}">
</div>
</div>
2018-05-22 10:34:39 +03:00
<div class="row">
<div class="input-field col s12 center-align">
<button class="btn waves-effect waves-light light-blue darken-1" type="submit" name="action">
2018-05-25 18:09:38 +03:00
{{.Locale.ButtonSave}}
2018-05-22 10:34:39 +03:00
<i class="material-icons right">sync</i>
</button>
</div>
</div>
2018-05-22 10:34:39 +03:00
</form>
</div>
</div>
<div id="tab2" class="col s12">
<div class="row indent-top">
<form id="add-bot" class="tab-el-center" action="/add-bot/" method="POST">
2018-05-28 18:16:13 +03:00
<input name="connectionId" type="hidden" value="{{.Conn.ID}}">
2018-05-22 10:34:39 +03:00
<div class="row">
<div class="input-field col s12">
2018-05-22 10:34:39 +03:00
<input placeholder="{{.Locale.TableToken}}" id="token" name="token" type="text" class="validate">
</div>
</div>
<div class="row">
<div class="input-field col s12 center-align">
<button class="btn waves-effect waves-light light-blue darken-1" type="submit" name="action">
{{.Locale.AddBot}} <i class="material-icons right">add</i>
2018-05-22 10:34:39 +03:00
</button>
</div>
</div>
</form>
<table id="bots" class="tab-el-center">
2018-05-22 10:34:39 +03:00
<thead>
<tr>
<th>{{.Locale.TableName}}</th>
<th>{{.Locale.TableToken}}</th>
<th class="text-left">{{.Locale.TableActivity}}</th>
</tr>
</thead>
<tbody>
{{range .Bots}}
<tr>
<td>{{.Name}}</td>
<td>{{.Token}}</td>
<td>
<button class="activity-bot btn btn-small waves-effect waves-light light-blue darken-1" type="submit" name="action"
2018-05-22 10:34:39 +03:00
data-activity="{{.Active}}" data-token="{{.Token}}">
<i class="material-icons">{{if .Active}}pause{{else}}play_arrow{{end}}</i>
2018-05-22 10:34:39 +03:00
</button>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
2018-05-22 10:34:39 +03:00
</div>
{{end}}