Issue #205 removable shortcut checkbox in config

Added new $config['remove_shorturl_checkbox''].
All themes has been updated.
This commit is contained in:
PJanisio 2014-11-11 14:57:37 +01:00
parent 79f0b4882f
commit ece1130fe8
6 changed files with 61 additions and 43 deletions

View File

@ -132,6 +132,7 @@ $config['disable_api'] = false;
$config['disable_keep_forever'] = false; $config['disable_keep_forever'] = false;
$config['blocked_words'] = ''; $config['blocked_words'] = '';
$config['disable_shorturl'] = false; $config['disable_shorturl'] = false;
$config['remove_shorturl_checkbox''] = false;
$config['disallow_search_engines'] = false; $config['disallow_search_engines'] = false;
//spamadmin: accessible via /spamadmin (only active when user + pass is set) //spamadmin: accessible via /spamadmin (only active when user + pass is set)

View File

@ -75,14 +75,17 @@
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<?php <?php
$set = array('name' => 'private', 'id' => 'private', 'tabindex' => '6', 'value' => '1', 'checked' => $private_set); if ($this->config->item('remove_shorturl_checkbox') == false)
if ($this->config->item('private_only')){ {
$set['checked'] = 1; $set = array('name' => 'snipurl', 'id' => 'snipurl', 'value' => '1', 'tabindex' => '5', 'checked' => $snipurl_set);
if ($this->config->item('disable_shorturl')){
$set['checked'] = 0;
$set['disabled'] = 'disabled'; $set['disabled'] = 'disabled';
} }
echo form_checkbox($set); echo form_checkbox($set);
?> echo lang('paste_create_shorturl') . ' - ' . lang('paste_shorturl_desc');
<?php echo lang('paste_private') . ' - ' . lang('paste_private_desc'); ?> } ?>
</label> </label>
</div> </div>
</div> </div>

View File

@ -68,6 +68,9 @@
<div class="item_group"> <div class="item_group">
<div class="item"> <div class="item">
<?php if ($this->config->item('remove_shorturl_checkbox') == false)
{
?>
<label for="snipurl"><?php echo lang('paste_create_shorturl'); ?> <label for="snipurl"><?php echo lang('paste_create_shorturl'); ?>
<span class="instruction"><?php echo lang('paste_shorturl_desc'); ?></span> <span class="instruction"><?php echo lang('paste_shorturl_desc'); ?></span>
</label> </label>
@ -81,6 +84,7 @@
echo form_checkbox($set); echo form_checkbox($set);
?> ?>
</div> </div>
<?php } ?>
</div> </div>
<div class="item"> <div class="item">

View File

@ -53,6 +53,9 @@
<div class="item_group"> <div class="item_group">
<div class="item"> <div class="item">
<?php if ($this->config->item('remove_shorturl_checkbox') == false)
{
?>
<label for="snipurl"><?php echo lang('paste_create_shorturl'); ?> <label for="snipurl"><?php echo lang('paste_create_shorturl'); ?>
<span class="instruction"><?php echo lang('paste_shorturl_desc'); ?></span> <span class="instruction"><?php echo lang('paste_shorturl_desc'); ?></span>
</label> </label>
@ -66,6 +69,7 @@
echo form_checkbox($set); echo form_checkbox($set);
?> ?>
</div> </div>
<?php } ?>
</div> </div>
<div class="item"> <div class="item">

View File

@ -60,14 +60,17 @@
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<?php <?php
if ($this->config->item('remove_shorturl_checkbox') == false)
{
$set = array('name' => 'snipurl', 'id' => 'snipurl', 'value' => '1', 'tabindex' => '5', 'checked' => $snipurl_set); $set = array('name' => 'snipurl', 'id' => 'snipurl', 'value' => '1', 'tabindex' => '5', 'checked' => $snipurl_set);
if ($this->config->item('disable_shorturl')){ if ($this->config->item('disable_shorturl')){
$set['checked'] = 0; $set['checked'] = 0;
$set['disabled'] = 'disabled'; $set['disabled'] = 'disabled';
} }
echo form_checkbox($set); echo form_checkbox($set);
?> echo lang('paste_create_shorturl') . ' - ' . lang('paste_shorturl_desc');
<?php echo lang('paste_create_shorturl') . ' - ' . lang('paste_shorturl_desc'); ?> } ?>
</label> </label>
</div> </div>
</div> </div>

View File

@ -74,14 +74,17 @@
<div class="controls"> <div class="controls">
<label class="checkbox"> <label class="checkbox">
<?php <?php
$set = array('name' => 'private', 'id' => 'private', 'tabindex' => '6', 'value' => '1', 'checked' => $private_set); if ($this->config->item('remove_shorturl_checkbox') == false)
if ($this->config->item('private_only')){ {
$set['checked'] = 1; $set = array('name' => 'snipurl', 'id' => 'snipurl', 'value' => '1', 'tabindex' => '5', 'checked' => $snipurl_set);
if ($this->config->item('disable_shorturl')){
$set['checked'] = 0;
$set['disabled'] = 'disabled'; $set['disabled'] = 'disabled';
} }
echo form_checkbox($set); echo form_checkbox($set);
?> echo lang('paste_create_shorturl') . ' - ' . lang('paste_shorturl_desc');
<?php echo lang('paste_private') . ' - ' . lang('paste_private_desc'); ?> } ?>
</label> </label>
</div> </div>
</div> </div>