/**
     * Bootstrap
     */
    public function ea_bootstrap($attrs)
    {
        $settings = EALogic::get_options();
        $settings['width'] = $this->defaultSettings($attrs, 'width', '400px');
        $settings['scroll_off'] = $this->defaultSettings($attrs, 'scroll_off', false);
        $settings['layout_cols'] = $this->defaultSettings($attrs, 'layout_cols', '1');
        $settings['trans.please-select-new-date'] = __('Please select another day', 'easy-appointments');
        $settings['trans.personal-informations'] = __('Personal information', 'easy-appointments');
        $settings['trans.field-required'] = __('This field is required.', 'easy-appointments');
        $settings['trans.error-email'] = __('Please enter a valid email address', 'easy-appointments');
        $settings['trans.error-name'] = __('Please enter at least 3 characters.', 'easy-appointments');
        $settings['trans.error-phone'] = __('Please enter at least 3 digits.', 'easy-appointments');
        $settings['trans.fields'] = __('Fields with * are required', 'easy-appointments');
        $settings['trans.email'] = __('Email', 'easy-appointments');
        $settings['trans.name'] = __('Name', 'easy-appointments');
        $settings['trans.phone'] = __('Phone', 'easy-appointments');
        $settings['trans.comment'] = __('Comment', 'easy-appointments');
        $settings['trans.overview-message'] = __('Please check your appointment details below and confirm:', 'easy-appointments');
        $settings['trans.booking-overview'] = __('Booking overview', 'easy-appointments');
        $settings['trans.date-time'] = __('Date & time', 'easy-appointments');
        $settings['trans.submit'] = __('Submit', 'easy-appointments');
        $settings['trans.cancel'] = __('Cancel', 'easy-appointments');
        $settings['trans.price'] = __('Price', 'easy-appointments');
        $settings['trans.iagree'] = __('I agree with terms and conditions', 'easy-appointments');
        $settings['trans.field-iagree'] = __('You must agree with terms and conditions', 'easy-appointments');
        $customCss = $settings['custom.css'];
        $customCss = strip_tags($customCss);
        $customCss = str_replace(array('<?php', '?>'), array('', ''), $customCss);
        unset($settings['custom.css']);
        $dbmod = new EADBModels();
        $rows = $dbmod->get_all_rows("ea_meta_fields", array(), array('position' => 'ASC'));
        $settings['MetaFields'] = $rows;
        wp_localize_script('ea-front-bootstrap', 'ea_settings', $settings);
        wp_enqueue_script('underscore');
        wp_enqueue_script('ea-validator');
        wp_enqueue_script('ea-bootstrap');
        // wp_enqueue_script( 'ea-datepicker-localization' );
        // wp_enqueue_script( 'ea-bootstrap-select' );
        wp_enqueue_script('ea-front-bootstrap');
        if (empty($settings['css.off'])) {
            wp_enqueue_style('ea-bootstrap');
            // wp_enqueue_style( 'ea-bootstrap-select' );
            // wp_enqueue_style( 'ea-frontend-style' );
            wp_enqueue_style('ea-admin-awesome-css');
            wp_enqueue_style('ea-frontend-bootstrap');
        }
        ob_start();
        echo "<style type='text/css'>{$customCss}</style>";
        require EA_SRC_DIR . 'templates/ea_bootstrap.tpl.php';
        require EA_SRC_DIR . 'templates/booking.overview.tpl.php';
        ?>
<div class="ea-bootstrap bootstrap" /><?php 
        return ob_get_clean();
    }
 /**
  * Content of top menu page
  */
 public function top_settings_menu()
 {
     $settings = EALogic::get_options();
     wp_localize_script('ea-settings', 'ea_settings', $settings);
     $screen = get_current_screen();
     $screen->add_help_tab(array('id' => 'easyapp_settings_help', 'title' => 'Settings', 'content' => '<p>You need to define at least one location, worker and service! Without that widget wont work.</p>'));
     $screen->set_help_sidebar('<a href="http://nikolaloncar.com/easy-appointments-wordpress-plugin/easy-appointments-documentation/">More info!</a>');
     require_once EA_SRC_DIR . 'templates/admin.tpl.php';
     require_once EA_SRC_DIR . 'templates/inlinedata.tpl.php';
 }
Example #3
0
 public function generateFormSettings()
 {
     $settings = EALogic::get_options();
     wp_localize_script('ea-settings', 'ea_settings', $settings);
     $screen = get_current_screen();
     require_once EA_SRC_DIR . 'templates/admin.tpl.php';
     require_once EA_SRC_DIR . 'templates/inlinedata.tpl.php';
 }