2016-12-09 20:39:02 +01:00
|
|
|
$(document).ready(function() {
|
|
|
|
// Show and activate password fields after box was checked
|
|
|
|
// Hidden by default
|
|
|
|
if ( !$("#togglePwNew").is(':checked') ) {
|
|
|
|
$(".passFields").hide();
|
|
|
|
}
|
|
|
|
$('#togglePwNew').click(function() {
|
|
|
|
$("#user_new_pass").attr("disabled", !this.checked);
|
|
|
|
$("#user_new_pass2").attr("disabled", !this.checked);
|
|
|
|
var $this = $(this);
|
|
|
|
if ($this.is(':checked')) {
|
|
|
|
$(".passFields").slideDown();
|
|
|
|
} else {
|
|
|
|
$(".passFields").slideUp();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Show generate button after time selection
|
2017-01-25 19:07:30 +01:00
|
|
|
$('#generate_tla').hide();
|
2016-12-09 20:39:02 +01:00
|
|
|
$('#validity').change(function(){
|
2017-01-25 19:07:30 +01:00
|
|
|
$('#generate_tla').show();
|
2016-12-09 20:39:02 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
// Init Bootstrap Switch
|
|
|
|
$.fn.bootstrapSwitch.defaults.onColor = 'success';
|
|
|
|
$("[name='tls_out']").bootstrapSwitch();
|
|
|
|
$("[name='tls_in']").bootstrapSwitch();
|
2017-01-12 20:26:10 +01:00
|
|
|
|
|
|
|
// Log modal
|
|
|
|
$('#logModal').on('show.bs.modal', function(e) {
|
|
|
|
var logText = $(e.relatedTarget).data('log-text');
|
2017-01-15 17:39:17 +01:00
|
|
|
$(e.currentTarget).find('#logText').html('<pre style="background:none;font-size:11px;line-height:1.1;border:0px">' + logText + '</pre>');
|
2017-01-12 20:26:10 +01:00
|
|
|
});
|
2016-12-09 20:39:02 +01:00
|
|
|
});
|