mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Add option to apply default file settings to module
This commit is contained in:
parent
9d08cac27b
commit
6d2a91134c
9 changed files with 58 additions and 14 deletions
5
modules/file/tpl/css/config.css
Normal file
5
modules/file/tpl/css/config.css
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.use_default_file_config {
|
||||
margin-top: -10px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
<load target="css/config.css" />
|
||||
<load target="js/config.js" />
|
||||
|
||||
<section class="section">
|
||||
<h1>{$lang->file}</h1>
|
||||
|
||||
|
|
@ -7,6 +10,17 @@
|
|||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
|
||||
<div class="x_control-group use_default_file_config">
|
||||
<label for="allowed_filesize" class="x_control-label">{$lang->use_default_file_config}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_default_file_config" class="x_inline">
|
||||
<input type="checkbox" name="use_default_file_config" id="use_default_file_config" value="Y" checked="checked"|cond="$file_config->use_default_file_config" />
|
||||
{$lang->about_use_default_file_config}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="use_custom_file_config" style="display:none"|cond="$file_config->use_default_file_config">
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -87,6 +101,8 @@
|
|||
<p class="x_help-block">{$lang->about_allowed_filetypes}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->enable_download_group}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
12
modules/file/tpl/js/config.js
Normal file
12
modules/file/tpl/js/config.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(function($) {
|
||||
$(function() {
|
||||
|
||||
$('#use_default_file_config').on('change', function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.use_custom_file_config').hide();
|
||||
} else {
|
||||
$('.use_custom_file_config').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue