            <div class="form-group">
                <tmpl_if name="edit_disabled">

                    <label for="parent_domain_id" class="col-sm-3 control-label">{tmpl_var name='parent_domain_id_txt'}</label>
                    <div class="col-sm-9"><select name="parent_domain_id" id="parent_domain_id" class="form-control" disabled="disabled">
                        {tmpl_var name='parent_domain_id'}
                    </select></div>
                    <input type="hidden" name="parent_domain_id" value="{tmpl_var name='parent_domain_id_value'}" />
                    <tmpl_else>
                        <label for="parent_domain_id" class="col-sm-3 control-label">{tmpl_var name='parent_domain_id_txt'}</label>
                        <div class="col-sm-9"><select name="parent_domain_id" id="parent_domain_id" class="form-control">
                            {tmpl_var name='parent_domain_id'}
                        </select></div>
                </tmpl_if>
            </div>

            <div class="form-group">
                <label for="run_min" class="col-sm-3 control-label">{tmpl_var name='run_min_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="run_min" id="run_min" value="{tmpl_var name='run_min'}" class="form-control" />
					<p class="formHint">e.g. *, */3, 10-20</p>
				</div>
            </div>
            <div class="form-group">
                <label for="run_hour" class="col-sm-3 control-label">{tmpl_var name='run_hour_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="run_hour" id="run_hour" value="{tmpl_var name='run_hour'}" class="form-control" />
					<p class="formHint">e.g. *, */2, 0, 10-12</p>
				</div>
            </div>
            <div class="form-group">
                <label for="run_mday" class="col-sm-3 control-label">{tmpl_var name='run_mday_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="run_mday" id="run_mday" value="{tmpl_var name='run_mday'}" class="form-control" />
					<p class="formHint">e.g. *, */4, 1-5</p>
				</div>
            </div>
            <div class="form-group">
                <label for="run_month" class="col-sm-3 control-label">{tmpl_var name='run_month_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="run_month" id="run_month" value="{tmpl_var name='run_month'}" class="form-control" />
					<p class="formHint">e.g. *, 1-6</p>
				</div>
            </div>
            <div class="form-group">
                <label for="run_wday" class="col-sm-3 control-label">{tmpl_var name='run_wday_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="run_wday" id="run_wday" value="{tmpl_var name='run_wday'}" class="form-control" />
					<p class="formHint">e.g. *, 0, 1-5</p>
				</div>
            </div>
            <div class="form-group">
                <label for="command" class="col-sm-3 control-label">{tmpl_var name='command_txt'}</label>
                <div class="col-sm-9">
					<input type="text" name="command" id="command" value="{tmpl_var name='command'}" class="form-control" />
                    <b>{tmpl_var name='variables_txt'}:</b>
                                       <a href="javascript:void(0);" data-toggle="tooltip" id="php_cli_binary" title="{tmpl_var name='php_cli_binary'}" class="addPlaceholder">{SITE_PHP}</a>,
                                       <a href="javascript:void(0);" data-toggle="tooltip" id="docroot_client" title="{tmpl_var name='docroot_client'}" class="addPlaceholder">{DOCROOT_CLIENT}</a>,
                                       <a href="javascript:void(0);" data-toggle="tooltip" id="domain" title="{tmpl_var name='domain'}" class="addPlaceholder">{DOMAIN}</a>
                                       <br><br><p class="formHint">{tmpl_var name='command_hint_txt'}</p>
				</div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='log_output_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='log'}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
                <div class="col-sm-9">
                    {tmpl_var name='active'}
                </div>
            </div>
        <input type="hidden" name="id" value="{tmpl_var name='id'}">

        <div class="clear"><div class="right">
            <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>
            <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>
        </div></div>

        <script language="JavaScript" type="text/javascript">
        // Select first existing domain "onLoad"
        jQuery(document).ready(function() {
            jQuery('#parent_domain_id').trigger('change');
        });
        // Reload cron placeholders if a different domain was selected
        jQuery('#parent_domain_id').change(function() {
            reloadCronPlaceholders();
        });

        function reloadCronPlaceholders() {
            var parentDomainId = jQuery('#parent_domain_id').val()
            jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id: parentDomainId, 'type': 'getcronplaceholders'}, function(data) {
                //console.log(data);
                $("#php_cli_binary").attr('data-original-title', data.php_cli_binary);
                $('#docroot_client').attr('data-original-title', data.docroot_client);
                // Update the data-original-title of the {DOMAIN} placeholder or load and display a hint to the user that no domain was selected yet. Should only happen if no web has been created or assigned by or to the user.
                if(data.domain) {
                    $('#domain').attr('data-original-title', data.domain);
                } else {
                    $('#domain').attr('data-original-title', "{tmpl_var name='domain_not_selected_placeholder_txt'}");
                }
            });
        }
        </script>

