| 1 |
<div class="wrap"> |
| 2 |
|
| 3 |
<h2><?php _e("Watu Settings", 'watu'); ?></h2> |
| 4 |
|
| 5 |
<div class="postbox-container" style="min-width:60%;max-width:65%;margin-right:2%;"> |
| 6 |
|
| 7 |
<p><?php _e('Go to', 'watu')?> <a href="admin.php?page=watu_exams"><?php printf(__('Manage Your %s', 'watu'), ucfirst(WATU_QUIZ_WORD_PLURAL))?></a> |
| 8 |
| <a href="admin.php?page=watu_social_sharing"><?php _e('Social Sharing Options', 'watu');?></a></p> |
| 9 |
|
| 10 |
<form name="post" action="" method="post" id="post"> |
| 11 |
<div> |
| 12 |
<p><?php _e('Send the automated emails from this address:', 'watu')?> <input type="text" name="watu_admin_email" value="<?php echo watu_admin_email()?>" size="30"><br> |
| 13 |
<?php printf(__('This defaults to your main admin email. However to set a friendlier sender name you can overwrite it here by entering your name in format: <b>Your Name <email@domain.com></b><br>If you have problems with getting your emails delivered, please install a plugin like <a href="%s" target="_blank">WP Mail SMTP</a>. Watu will send the emails through the SMTP server that you congigure in it.', 'watu'), 'https://wordpress.org/plugins/wp-mail-smtp/');?></p> |
| 14 |
|
| 15 |
<p><input type="checkbox" name="debug_mode" value="1" <?php if(get_option('watu_debug_mode')) echo 'checked'?> /> <?php _e('Enable debug mode to see SQL errors. (Useful in case you have any problems)', 'watu')?></p> |
| 16 |
|
| 17 |
<div class="postarea"> |
| 18 |
<div class="postbox"> |
| 19 |
|
| 20 |
<h3 class="hndle"> <span><?php _e('Defaults', 'watu') ?></span></h3> |
| 21 |
<div class="inside" style="padding:8px"> |
| 22 |
<?php |
| 23 |
$single = $multi = ''; |
| 24 |
if( get_option('watu_answer_type') =='radio') $single='checked="checked"'; |
| 25 |
else $multi = 'checked="checked"'; |
| 26 |
?> |
| 27 |
<label> <input type='radio' name='answer_type' <?php print $single?> id="answer_type_r" value='radio' /> <?php _e('Single Answer', 'watu')?> </label> |
| 28 |
|
| 29 |
<label> <input type='radio' name='answer_type' <?php print $multi?> id="answer_type_c" value='checkbox' /> <?php _e('Multiple Answers', 'watu')?></label> |
| 30 |
|
| 31 |
<p><input type="checkbox" name="no_ajax" value="1" <?php if(get_option('watu_no_ajax') == 1) echo 'checked';?>> <?php printf(__('No ajax (applies when creating a new %s)', 'watu'), WATU_QUIZ_WORD);?></p> |
| 32 |
|
| 33 |
<p><?php _e('Words used for "quiz/quizzes":', 'watu');?> <input type="text" size="10" name="quiz_word" value="<?php echo esc_attr( empty($_POST['quiz_word']) ? WATU_QUIZ_WORD : $_POST['quiz_word']);?>"> / <input type="text" size="10" name="quiz_word_plural" value="<?php echo esc_attr( empty($_POST['quiz_word_plural']) ? WATU_QUIZ_WORD_PLURAL : $_POST['quiz_word_plural'] );?>"> <?php printf(__('This is not yet fully implemented! You can change any text within the plugin <a href="%s" target="_blank">this way</a>.', 'watu'), 'http://blog.calendarscripts.info/how-to-change-text-in-a-wordpress-plugin/');?></p> |
| 34 |
</div> |
| 35 |
|
| 36 |
|
| 37 |
</div> |
| 38 |
|
| 39 |
|
| 40 |
<div class="postbox wp-admin" style="padding:5px;"> |
| 41 |
<h3><?php _e('Question based captcha', 'watu')?></h3> |
| 42 |
|
| 43 |
<p><?php _e("You can use a simple text-based captcha. We have loaded 3 basic questions but you can edit them and load your own. Make sure to enter only one question per line and use = to separate question from answer.", 'watu')?></p> |
| 44 |
|
| 45 |
<p><textarea name="text_captcha" rows="10" cols="70"><?php echo stripslashes($text_captcha);?></textarea></p> |
| 46 |
<div class="help"><?php printf(__('This question-based captcha can be enabled individually by selecting a checkbox in the %s settings form. If you do not check the checkbox, the captcha question will not be generated.', 'watu'), WATU_QUIZ_WORD);?></div> |
| 47 |
</div> |
| 48 |
|
| 49 |
<?php if($is_admin):?> |
| 50 |
<div class="postbox"> |
| 51 |
<div class="inside"> |
| 52 |
<h3 class="hndle"><?php _e('Role Management','watu')?></h3> |
| 53 |
<h3><?php _e('WordPress roles that can administrate the plugin', 'watu')?></h3> |
| 54 |
|
| 55 |
<p><?php _e('By default this is only the blog administrator. Here you can enable any of the other roles as well', 'watu')?></p> |
| 56 |
|
| 57 |
<p><?php foreach($roles as $key=>$r): |
| 58 |
if($key=='administrator') continue; |
| 59 |
$role = get_role($key);?> |
| 60 |
<input type="checkbox" name="manage_roles[]" value="<?php echo $key?>" <?php if($role->has_cap('watu_manage')) echo 'checked';?>> <?php _e($role->name, 'watu')?> |
| 61 |
<?php endforeach;?></p> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
|
| 65 |
<?php endif;?> |
| 66 |
|
| 67 |
<div class="postbox"> |
| 68 |
<div class="inside"> |
| 69 |
<h3 class="hndle"><?php _e('CSV Exports','watu')?></h3> |
| 70 |
<p><label><?php _e('Field separator:','watu')?></label> <select name="csv_delim"> |
| 71 |
<option value="," <?php if($delim == ',') echo 'selected'?>><?php _e('Comma', 'watu');?></option> |
| 72 |
<option value="tab" <?php if($delim == 'tab') echo 'selected'?>><?php _e('TAB', 'watu');?></option> |
| 73 |
</select></p> |
| 74 |
<input type="checkbox" name="csv_quotes" value="1" <?php if(get_option('watu_csv_quotes')!==0) echo 'checked'?>> <?php _e('Add quotes around text fields (recommended)', 'watu')?> |
| 75 |
</div> |
| 76 |
</div> |
| 77 |
|
| 78 |
<div class="postbox"> |
| 79 |
<h3 class="hndle"> <span><?php _e('Other settings', 'watu') ?></span></h3> |
| 80 |
<div class="inside" style="padding:8px"> |
| 81 |
<p><label> <input type='checkbox' value="1" name='use_the_content' <?php if(get_option('watu_use_the_content') == '1') echo 'checked'?> /> <?php _e('Use "the_content" instead of our custom content filter (do not select this unless adviced so)', 'watu')?> </label></p> |
| 82 |
<p><label> <input type='checkbox' value="1" name='integrate_moolamojo' <?php if(get_option('watu_integrate_moolamojo') == '1') echo 'checked'?> /> <?php printf(__('Integrate <a href="%s" target="_blank">MoolaMojo</a> plugin to transfer %s points to the user virtual credits balance. The plugin must be installed and activated.', 'watu'), 'https://moolamojo.com', WATU_QUIZ_WORD)?> </label></p> |
| 83 |
<p><label> <input type='checkbox' value="1" name='dont_autoscroll' <?php if(get_option('watu_dont_autoscroll') == '1') echo 'checked'?> /> <?php _e('Do not auto-scroll top the page when user goes from page to page in a paginated quiz (selecting this is useful only on some page designs).', 'watu')?> </label></p> |
| 84 |
</div> |
| 85 |
</div> |
| 86 |
|
| 87 |
<div class="postbox"> |
| 88 |
<h3 class="hndle"> <span><?php _e('Database Option', 'watu') ?></span></h3> |
| 89 |
<div class="inside" style="padding:8px"> |
| 90 |
<?php |
| 91 |
$check = get_option('watu_delete_db'); |
| 92 |
?> |
| 93 |
<label> <input type='checkbox' value="1" name='delete_db' <?php if($delete_db) echo 'checked'?> onclick="this.checked ? jQuery('#deleteDBConfirm').show() : jQuery('#deleteDBConfirm').hide();" /> <?php _e('Delete stored Watu data when deinstalling the plugin.', 'watu')?> </label> |
| 94 |
|
| 95 |
<span id="deleteDBConfirm" style='display: <?php echo empty($delete_db) ? 'none' : 'inline';?>'> |
| 96 |
<?php _e('Please confirm by typing "yes" in the box:', 'watu')?> <input type="text" name="delete_db_confirm" value="<?php echo get_option('watu_delete_db_confirm')?>"> |
| 97 |
</span> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
|
| 101 |
<p class="submit"> |
| 102 |
<span id="autosave"></span> |
| 103 |
<input type="submit" name="submit" value="<?php _e('Save Options', 'watu') ?>" class="button-primary" /> |
| 104 |
</p> |
| 105 |
|
| 106 |
</div> |
| 107 |
</div> |
| 108 |
<?php wp_nonce_field('watu_options'); ?> |
| 109 |
</form> |
| 110 |
|
| 111 |
|
| 112 |
<div class="wrap"> |
| 113 |
<div class="postbox"> |
| 114 |
<div class="inside"> |
| 115 |
<h2><?php printf(__('Ajax in %s', 'watu'), WATU_QUIZ_WORD_PLURAL); ?></h2> |
| 116 |
|
| 117 |
<p><?php printf(__('Here you can select %s which will be submitted by regular post submit rather than using Ajax. You may want to do this mostly for the following reason:', 'watu'), WATU_QUIZ_WORD_PLURAL)?></p> |
| 118 |
|
| 119 |
<ul> |
| 120 |
<li><?php _e('To embed in the "Final screen" content from plugins that do not normally work well in Ajax mode.', 'watu')?></li> |
| 121 |
</ul> |
| 122 |
|
| 123 |
<p><b><?php printf(__('The selected %s will NOT use Ajax when users submit them.', 'watu'), WATU_QUIZ_WORD_PLURAL)?></b></p> |
| 124 |
|
| 125 |
<form name="post" action="" method="post" id="post"> |
| 126 |
<div> |
| 127 |
<div class="postarea"> |
| 128 |
<?php foreach($quizzes as $quiz):?> |
| 129 |
<input type="checkbox" name="no_ajax[]" value="<?php echo $quiz->ID?>" <?php if(!empty($quiz->no_ajax)) echo 'checked'?>> <?php echo stripslashes($quiz->name);?><br> |
| 130 |
<?php endforeach;?> |
| 131 |
</div> |
| 132 |
|
| 133 |
<p><input type="submit" name="save_ajax_settings" value="<?php _e('Save Ajax Related Settings', 'watu')?>" class="button-primary"></p> |
| 134 |
</div> |
| 135 |
<?php wp_nonce_field('watu_ajax_options'); ?> |
| 136 |
</form> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
|
| 141 |
</div> |
| 142 |
<div id="watu-sidebar"> |
| 143 |
<?php include(WATU_PATH."/views/sidebar.php");?> |
| 144 |
</div> |
| 145 |
</div> |
| 146 |
|