Skip to content

Commit 3b6793d

Browse files
author
Till Brehm
committed
Merge branch '5166-variables' into 'stable-3.1'
Add domain variable for directive snippets (#3375 and #5166) Closes #3375 and #5166 See merge request ispconfig/ispconfig3!1123
2 parents 8eef477 + 95fdcb6 commit 3b6793d

File tree

4 files changed

+216
-206
lines changed

4 files changed

+216
-206
lines changed

interface/web/admin/templates/directive_snippets_edit.htm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<div class="form-group">
1212
<label for="snippet" class="col-sm-3 control-label">{tmpl_var name='snippet_txt'}</label>
1313
<tmpl_if name='is_master'><div class="col-sm-9 col-text"><pre>{tmpl_var name='snippet'}</pre></div></tmpl_else><div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea>
14-
&nbsp; Nginx {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>, <a href="javascript:void(0);" class="addPlaceholder">{PHPFALLBACKFASTCGIPASS}</a><br />
15-
&nbsp; Apache {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT_CLIENT}</a> <br />
14+
&nbsp; Nginx {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{DOMAIN}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>, <a href="javascript:void(0);" class="addPlaceholder">{PHPFALLBACKFASTCGIPASS}</a><br />
15+
&nbsp; Apache {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT_CLIENT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{DOMAIN}</a> <br />
1616
&nbsp; PHP {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{WEBROOT}</a>
1717
</div></tmpl_if>
1818
</div>
@@ -38,31 +38,31 @@
3838
</div>
3939
<div class="form-group">
4040
<label for="update_sites" class="col-sm-3 control-label">{tmpl_var name='update_sites_txt'}</label>
41-
<div class="col-sm-9">{tmpl_var name='update_sites'}</div>
42-
</div>
43-
41+
<div class="col-sm-9">{tmpl_var name='update_sites'}</div>
42+
</div>
43+
4444
<input type="hidden" name="id" value="{tmpl_var name='id'}">
45-
45+
4646
<div class="clear"><div class="right">
4747
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/directive_snippets_edit.php">{tmpl_var name='btn_save_txt'}</button>
4848
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/directive_snippets_list.php">{tmpl_var name='btn_cancel_txt'}</button>
4949
</div></div>
5050
<script language="JavaScript" type="text/javascript">
51-
51+
5252
if(jQuery('#type').val() == 'nginx'){
5353
jQuery('.nginx:hidden').show();
5454
} else {
5555
jQuery('.nginx:visible').hide();
5656
}
57-
57+
5858
if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') {
5959
jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
6060
jQuery('.php:visible').hide();
6161
} else {
6262
jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show();
6363
jQuery('.php:hidden').show();
6464
}
65-
65+
6666
jQuery('#type').change(function(){
6767
if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') {
6868
jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
@@ -77,5 +77,5 @@
7777
jQuery('.nginx:visible').hide();
7878
}
7979
});
80-
80+
8181
</script>

0 commit comments

Comments
 (0)