| 1 |
<?php |
| 2 |
|
| 3 |
// +----------------------------------------------------------------------+ |
| 4 |
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) | |
| 5 |
// +----------------------------------------------------------------------+ |
| 6 |
// | This program is free software; you can redistribute it and/or modify | |
| 7 |
// | it under the terms of the GNU General Public License, version 2, as | |
| 8 |
// | published by the Free Software Foundation. | |
| 9 |
// | | |
| 10 |
// | This program is distributed in the hope that it will be useful, | |
| 11 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 |
// | GNU General Public License for more details. | |
| 14 |
// | | |
| 15 |
// | You should have received a copy of the GNU General Public License | |
| 16 |
// | along with this program; if not, write to the Free Software | |
| 17 |
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | |
| 18 |
// | MA 02110-1301 USA | |
| 19 |
// +----------------------------------------------------------------------+ |
| 20 |
// | Author: Eugene Manuilov <eugene@manuilov.org> | |
| 21 |
// +----------------------------------------------------------------------+ |
| 22 |
|
| 23 |
/** |
| 24 |
* Renders chart settings page. |
| 25 |
* |
| 26 |
* @category Visualizer |
| 27 |
* @package Render |
| 28 |
* @subpackage Page |
| 29 |
* |
| 30 |
* @since 1.0.0 |
| 31 |
*/ |
| 32 |
class Visualizer_Render_Page_Settings extends Visualizer_Render_Page { |
| 33 |
|
| 34 |
/** |
| 35 |
* Renders page content. |
| 36 |
* |
| 37 |
* @since 1.0.0 |
| 38 |
* |
| 39 |
* @access protected |
| 40 |
*/ |
| 41 |
protected function _renderContent() { |
| 42 |
echo '<div id="canvas">'; |
| 43 |
echo '<img src="', VISUALIZER_ABSURL, 'images/ajax-loader.gif" class="loader">'; |
| 44 |
echo '</div>'; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Renders toolbar content. |
| 49 |
* |
| 50 |
* @since 1.0.0 |
| 51 |
* |
| 52 |
* @access protected |
| 53 |
*/ |
| 54 |
protected function _renderToolbar() { |
| 55 |
echo '<a class="button button-large" href="', add_query_arg( 'tab', 'data' ), '">'; |
| 56 |
esc_html_e( 'Back', Visualizer_Plugin::NAME ); |
| 57 |
echo '</a>'; |
| 58 |
echo '<input type="submit" class="button button-primary button-large push-right" value="', $this->button, '">'; |
| 59 |
} |
| 60 |
|
| 61 |
/** |
| 62 |
* Renders page template. |
| 63 |
* |
| 64 |
* @since 1.0.0 |
| 65 |
* |
| 66 |
* @access protected |
| 67 |
*/ |
| 68 |
protected function _toHTML() { |
| 69 |
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">'; |
| 70 |
parent::_toHTML(); |
| 71 |
echo '</form>'; |
| 72 |
} |
| 73 |
|
| 74 |
/** |
| 75 |
* Renders sidebar content. |
| 76 |
* |
| 77 |
* @since 1.0.0 |
| 78 |
* |
| 79 |
* @access protected |
| 80 |
*/ |
| 81 |
protected function _renderSidebarContent() { |
| 82 |
echo $this->sidebar; |
| 83 |
} |
| 84 |
|
| 85 |
} |