|
52 | 52 | <div class="col-sm-9"> |
53 | 53 | <input type="text" name="command" id="command" value="{tmpl_var name='command'}" class="form-control" /> |
54 | 54 | <b>{tmpl_var name='variables_txt'}:</b> |
55 | | - <a href="javascript:void(0);" data-toggle="tooltip" title="{tmpl_var name='php_cli_binary'}" class="addPlaceholder">{SITE_PHP}</a>, |
56 | | - <a href="javascript:void(0);" data-toggle="tooltip" title="{tmpl_var name='docroot_client'}" class="addPlaceholder">{DOCROOT_CLIENT}</a>, |
57 | | - <a href="javascript:void(0);" data-toggle="tooltip" title="{tmpl_var name='domain'}" class="addPlaceholder">{DOMAIN}</a> |
| 55 | + <a href="javascript:void(0);" data-toggle="tooltip" id="php_cli_binary" title="{tmpl_var name='php_cli_binary'}" class="addPlaceholder">{SITE_PHP}</a>, |
| 56 | + <a href="javascript:void(0);" data-toggle="tooltip" id="docroot_client" title="{tmpl_var name='docroot_client'}" class="addPlaceholder">{DOCROOT_CLIENT}</a>, |
| 57 | + <a href="javascript:void(0);" data-toggle="tooltip" id="domain" title="{tmpl_var name='domain'}" class="addPlaceholder">{DOMAIN}</a> |
58 | 58 | <br><br><p class="formHint">{tmpl_var name='command_hint_txt'}</p> |
59 | 59 | </div> |
60 | 60 | </div> |
|
73 | 73 |
|
74 | 74 |
|
75 | 75 | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| 76 | + <input type="hidden" name="cron_type" value="{tmpl_var name='cron_type'}"> |
76 | 77 |
|
77 | 78 | <div class="clear"><div class="right"> |
78 | 79 | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="sites/cron_edit.php">{tmpl_var name='btn_save_txt'}</button> |
79 | 80 | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="sites/cron_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
80 | 81 | </div></div> |
| 82 | + |
| 83 | + <script language="JavaScript" type="text/javascript"> |
| 84 | + jQuery('#parent_domain_id').change(function(){ |
| 85 | + reloadCronPlaceholders(); |
| 86 | + }); |
| 87 | + |
| 88 | + function reloadCronPlaceholders() { |
| 89 | + var parentDomainId = jQuery('#parent_domain_id').val() |
| 90 | + var cron_type = jQuery('#cron_type').val() |
| 91 | + |
| 92 | + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id: parentDomainId, cron_type: cron_type, 'type': 'getcronplaceholders'}, function(data) { |
| 93 | + console.log(data); |
| 94 | + $("#php_cli_binary").attr('data-original-title', data.php_cli_binary); |
| 95 | + $('#docroot_client').attr('data-original-title', data.docroot_client); |
| 96 | + $('#domain').attr('data-original-title', data.domain); |
| 97 | + |
| 98 | + }); |
| 99 | + } |
| 100 | + </script> |
| 101 | + |
0 commit comments