Commit 0a1e9143 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch 'stable-3.1'

parents 8aa7d1f7 af56b491
......@@ -206,14 +206,14 @@
</div>
<tmpl_if name="limit_ssl" op="==" value="y"><div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='ssl_txt'}</label>
<div class="col-sm-9">
<div class="col-sm-9" data-uncheck-fields="ssl_letsencrypt">
{tmpl_var name='ssl'}
</div>
</div>
<tmpl_if name="limit_ssl_letsencrypt" op="==" value="y">
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='ssl_letsencrypt_txt'}</label>
<div class="col-sm-9">
<div class="col-sm-9" data-check-fields="ssl">
{tmpl_var name='ssl_letsencrypt'}
</div>
</div></tmpl_if>
......
......@@ -1021,7 +1021,7 @@ class page_action extends tform_actions {
if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = 'n';
if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = 'n';
if($client['limit_ssl_letsencrypt'] != 'y') $this->dataRecord['ssl_letsencrypt'] = 'n';
if($client['limit_directive_snippets'] != 'y') $this->dataRecord['directive_snippets_id'] = 0
if($client['limit_directive_snippets'] != 'y') $this->dataRecord['directive_snippets_id'] = 0;
// only generate quota and traffic warnings if value has changed
if($this->id > 0) {
......
......@@ -702,6 +702,29 @@ $(document).on("click", ".addPlaceholderContent", function(){
template2.insertAtCaret(placeholderContentText);
});
$(document).on("click", "[data-check-fields] > input[type='checkbox']", function() {
if($(this).is(':checked')) {
var flds = $(this).parent().attr('data-check-fields');
var tmp = flds.split(/,/);
for(var i = 0; i < tmp.length; i++) {
var fname = tmp[i];
$('input[type="checkbox"][name="' + fname + '"]').prop('checked', true);
}
}
});
$(document).on("click", "[data-uncheck-fields] > input[type='checkbox']", function() {
if($(this).is(':checked') == false) {
var flds = $(this).parent().attr('data-uncheck-fields');
var tmp = flds.split(/,/);
for(var i = 0; i < tmp.length; i++) {
var fname = tmp[i];
$('input[type="checkbox"][name="' + fname + '"]').prop('checked', false);
}
}
});
$(document).on('ready', function () {
$.fn.extend({
insertAtCaret: function(myValue){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment