mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 16:22:57 -07:00
56 lines
2.7 KiB
HTML
56 lines
2.7 KiB
HTML
% if data:
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-remove"></i></button>
|
|
<h4 class="modal-title" id="notification-config-modal-header">Set Config</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<form action="set_notification_config" method="post" class="form" id="set_notification_config" data-parsley-validate>
|
|
<div class="col-md-6">
|
|
% for item in data:
|
|
% if item['input_type'] != 'checkbox':
|
|
<div class="form-group">
|
|
<label for="${item['name']}">${item['label']}</label>
|
|
<input type="${item['input_type']}" class="form-control" id="${item['name']}" name="${item['name']}" value="${item['value']}" size="30">
|
|
% if item['name'] == 'osx_notify_app':
|
|
<a href="javascript:void(0)" id="osxnotifyregister">Register</a>
|
|
% endif
|
|
<p class="help-block">${item['description']}</p>
|
|
</div>
|
|
% elif item['input_type'] == 'checkbox':
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" id="${item['name']}" name="${item['name']}" value="1" ${item['value']}> ${item['label']}
|
|
</label>
|
|
<p class="help-block">${item['description']}</p>
|
|
</div>
|
|
% endif
|
|
% endfor
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<input type="button" id="save-notification-item" class="btn btn-bright" value="Save">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
|
|
<script>
|
|
$('#osxnotifyregister').click(function () {
|
|
var osx_notify_app = $("#osx_notify_app").val();
|
|
$.get("/osxnotifyregister", {'app': osx_notify_app}, function (data) { $('#ajaxMsg').html("<div class='msg'><span class='ui-icon ui-icon-check'></span>"+data+"</div>"); });
|
|
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut()
|
|
})
|
|
|
|
var notificationConfig = $("#set_notification_config");
|
|
$('#save-notification-item').click(function() {
|
|
doAjaxCall('set_notification_config',$(this),'tabs',true);
|
|
return false;
|
|
});
|
|
</script>
|