blob: 7b82199e87d859b3998726f674a9103e2a4a6bcb (
plain) (
tree)
|
|
<h2>
{{#new}}{{lang_createPanel}}{{/new}}
{{^new}}{{lang_editPanel}}{{/new}}
</h2>
<p>{{lang_editUrlPanelHints}}</p>
<form method="post" action="?do=locationinfo" id="config-form">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="writePanelConfig">
<input type="hidden" name="ptype" value="URL">
<input type="hidden" name="uuid" value="{{uuid}}">
<div class="panel panel-default">
<div class="panel-heading">{{lang_display}}</div>
<div class="panel-body">
<div class="list-group">
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="panel-title">{{lang_displayName}}</label>
</div>
<div class="col-sm-7">
<input class="form-control" name="name" id="panel-title" type="text" value="{{panelname}}">
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_displayNameTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="panel-url">{{lang_url}}</label>
</div>
<div class="col-sm-7">
<input class="form-control" name="url" id="panel-url" type="text" value="{{url}}"
placeholder="http://www.bwlehrpool.de/" pattern=".*://.*" required>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_urlTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="input-ssl">{{lang_insecureSsl}}</label>
</div>
<div class="col-sm-7">
<div class="checkbox">
<input id="input-ssl" type="checkbox" name="insecure-ssl" {{ssl_checked}} value="1">
<label></label>
</div>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_ignoreSslTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="input-reload">{{lang_reloadIntervalMins}}</label>
</div>
<div class="col-sm-7">
<input class="form-control" id="input-reload" type="number" min="0" max="999" name="reloadminutes" pattern="\d*" value="{{reloadminutes}}">
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_reloadIntervalTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<div class="radio">
<input type="radio" name="iswhitelist" value="1" {{iswhitelist_1_checked}} id="iswhitelist1" class="form-control">
<label for="iswhitelist1">
{{lang_urlWhitelist}}
</label>
</div>
<div class="radio">
<input type="radio" name="iswhitelist" value="0" {{iswhitelist_0_checked}} id="iswhitelist0" class="form-control">
<label for="iswhitelist0">
{{lang_urlBlacklist}}
</label>
</div>
</div>
<div class="col-sm-7">
<textarea name="urllist" rows="10" class="form-control">{{urllist}}</textarea>
<p>{{lang_urlListHelp}}</p>
</div>
<div class="col-sm-2"></div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="split-login">{{lang_splitlogin}}</label>
</div>
<div class="col-sm-7">
<div class="checkbox">
<input id="split-login" type="checkbox" name="split-login" {{split-login_checked}} value="1">
<label></label>
</div>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_splitloginTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item">
<div class="row">
<div class="col-sm-3">
<label for="browser">{{lang_browser}}</label>
</div>
<div class="col-sm-7">
<select class="form-control" name="browser" id="browser" onchange="browserChange()">
<option value="slx-browser" id="slx">{{lang_slxbrowser}}</option>
<option value="chromium" id="chrome">{{lang_chromium}}</option>
</select>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_browserTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item b0-h">
<div class="row">
<div class="col-sm-3">
<label for="interactive">{{lang_interactive}}</label>
</div>
<div class="col-sm-7">
<div class="checkbox">
<input id="interactive" type="checkbox" name="interactive" {{interactive_checked}} value="1">
<label></label>
</div>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_interactiveTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
</div>
<div class="list-group-item" id="bookmarks">
<div class="row">
<div class="col-sm-3">
<label for="bookmarks">{{lang_bookmarks}}</label>
</div>
<div class="col-sm-7">
<button type="button" class="btn btn-success" onclick="addBookmark()">
<span class="glyphicon glyphicon-plus"></span>
</button>
</div>
<div class="col-sm-2">
<p class="btn btn-static helptext" title="{{lang_bookmarksTooltip}}">
<span class="glyphicon glyphicon-question-sign"></span>
</p>
</div>
</div>
<div class="row" style="margin-top: 1em;" id="bookmarkRow" hidden>
<div class="col-sm-3 col-sm-offset-3">
<input class="form-control" name="bookmarkNames[]" type="text" value=""
placeholder="bwLehrpool">
</div>
<div class="col-sm-3">
<input class="form-control" name="bookmarkUrls[]" type="text" value=""
placeholder="http://www.bwlehrpool.de/" pattern=".*://.*">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-danger" onclick="this.closest('.row').remove()">
<span class="glyphicon glyphicon-minus"></span>
</button>
</div>
</div>
{{#bookmarks}}
<div class="row" style="margin-top: 1em;">
<div class="col-sm-3 col-sm-offset-3">
<input class="form-control" name="bookmarkNames[]" type="text" value="{{name}}"
placeholder="bwLehrpool" required>
</div>
<div class="col-sm-3">
<input class="form-control" name="bookmarkUrls[]" type="text" value="{{url}}"
placeholder="http://www.bwlehrpool.de/" pattern=".*://.*" required>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-danger" onclick="this.closest('.row').remove()">
<span class="glyphicon glyphicon-minus"></span>
</button>
</div>
</div>
{{/bookmarks}}
</div>
</div>
</div>
</div>
<div class="text-right">
<a href="?do=locationinfo&show=panels" class="btn btn-default">{{lang_cancel}}</a>
<button type="submit" class="btn btn-primary">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
</button>
</div>
</form>
<script type="text/javascript"><!--
document.addEventListener("DOMContentLoaded", function () {
// Initialize fancy tooltips
$('p.helptext').tooltip();
// load value to dropdown menus
$('#browser option[value="{{browser}}"]').attr("selected", "selected");
browserChange();
});
// Hide interactive-input if slx-browser is selected
function browserChange() {
var value = $('#browser').val();
if (value !== 'slx-browser') {
$('.b0-h').show();
} else {
$('.b0-h').hide();
$('#interactive').prop('checked', false);
}
}
// Add another bookmark input field to the form
function addBookmark() {
var rowCopy = $('#bookmarkRow').clone();
rowCopy.attr('id', '');
rowCopy.show();
rowCopy.find('input').each(function() {
$( this ).val('');
$( this ).prop('required', true);
});
$('#bookmarks').append(rowCopy);
}
//--></script>
|