Пример #1
0
function ninja_forms_feditor_new_post_rule()
{
    $rule_id = $_REQUEST['new_rule_id'];
    ninja_forms_feditor_output_post_rule_tr($rule_id);
    die;
}
Пример #2
0
function ninja_forms_feditor_post_edit_rules($metabox)
{
    $form_count = 0;
    $plugin_settings = get_option('ninja_forms_settings');
    if (isset($plugin_settings['feditor'])) {
        $feditor_settings = $plugin_settings['feditor'];
    } else {
        $feditor_settings = array();
    }
    if (isset($feditor_settings['post_rules'])) {
        $post_rules = $feditor_settings['post_rules'];
    } else {
        $post_rules = array();
    }
    ?>

	<h3><?php 
    _e('Post Editing Rules', 'ninja-forms-feditor');
    ?>
</h3>
	<div id="" class="tablenav top">
		<div class="alignleft actions">
			<input type="submit" name="submit" value="<?php 
    _e('Save', 'ninja-forms-feditor');
    ?>
" class="button-primary">
		</div>
		<div class="alignleft actions">
			<input type="button" id="new_post_rule" value="<?php 
    _e('+ New Rule', 'ninja-forms-feditor');
    ?>
" class="button-secondary">
		</div>
		<div class="alignleft actions">
			<select id="" class="" name="bulk_action">
				<option value=""><?php 
    _e('Bulk Actions', 'ninja-forms');
    ?>
</option>
				<option value="delete"><?php 
    _e('Delete', 'ninja-forms');
    ?>
</option>
				<!-- <option value="export"><?php 
    _e('Export Forms', 'ninja-forms');
    ?>
</option> -->
			</select>
			<input type="submit" name="submit" value="Apply" class="button-secondary">
		</div>
		<div class="alignleft actions">
			<span class="spinner"></span>
		</div>
	</div>
	<table class="wp-list-table widefat fixed posts">
		<thead>
			<tr>
				<th class="check-column"><input type="checkbox" id="" class="ninja-forms-select-all" title="ninja-forms-bulk-action"></th>
				<th></th>
				<th><?php 
    _e('Allow user', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('Allow role', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('To Edit', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('To Delete', 'ninja-forms-feditor');
    ?>
</th>
				<th colspan="2"><?php 
    _e('Where', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('That', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('Using', 'ninja-forms-feditor');
    ?>
</th>
			</tr>
		</thead>
		<tbody id="rule_tbody">

			<li id="rule_x_user_y" class="rule-x-user-template hidden" rel="x-y">
				<a href="#" class="rule-remove-user button-secondary" rel="x-y">X</a> - <span class="user-name"></span>
			</li>
			<?php 
    foreach ($post_rules as $key => $data) {
        ninja_forms_feditor_output_post_rule_tr($key);
    }
    ?>
		</tbody>
		<tfoot>
			<tr>
				<th class="check-column"><input type="checkbox" id="" class="ninja-forms-select-all" title="ninja-forms-bulk-action"></th>
				<th></th>
				<th><?php 
    _e('Allow user', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('Allow role', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('To Edit', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('To Delete', 'ninja-forms-feditor');
    ?>
</th>
				<th colspan="2"><?php 
    _e('Where', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('That', 'ninja-forms-feditor');
    ?>
</th>
				<th><?php 
    _e('Using', 'ninja-forms-feditor');
    ?>
</th>
			</tr>
		</tfoot>
	</table>
	<br />
	<div class="alignleft actions">
		<input type="submit" name="submit" value="<?php 
    _e('Save', 'ninja-forms-feditor');
    ?>
" class="button-primary">
	</div>
	<?php 
}