mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix various warnings in board configuration submenus
This commit is contained in:
parent
eb76f9d8bb
commit
967f67ec99
8 changed files with 37 additions and 33 deletions
|
|
@ -172,6 +172,7 @@ class ModuleAdminModel extends Module
|
|||
$grant_list->manager->default = 'manager';
|
||||
Context::set('grant_list', $grant_list);
|
||||
// Get a permission group granted to the current module
|
||||
$selected_group = array();
|
||||
$default_grant = array();
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
|
|
@ -375,21 +376,24 @@ class ModuleAdminModel extends Module
|
|||
$skin_vars = $oModuleModel->getModuleMobileSkinVars($module_srl);
|
||||
}
|
||||
|
||||
if($skin_info->extra_vars)
|
||||
if($skin_info && $skin_info->extra_vars)
|
||||
{
|
||||
foreach($skin_info->extra_vars as $key => $val)
|
||||
{
|
||||
$group = $val->group;
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
if($skin_vars[$name])
|
||||
if (isset($skin_vars[$name]) && $skin_vars[$name])
|
||||
{
|
||||
$value = $skin_vars[$name]->value;
|
||||
}
|
||||
else $value = '';
|
||||
if($type=="checkbox")
|
||||
else
|
||||
{
|
||||
$value = $value?unserialize($value):array();
|
||||
$value = '';
|
||||
}
|
||||
if ($type === 'checkbox')
|
||||
{
|
||||
$value = $value ? unserialize($value) : [];
|
||||
}
|
||||
|
||||
$value = empty($value) ? $val->default : $value;
|
||||
|
|
|
|||
|
|
@ -424,14 +424,14 @@ class ModuleModel extends Module
|
|||
*
|
||||
* @param stdClass $moduleInfo Module information
|
||||
*/
|
||||
private static function _applyDefaultSkin(&$module_info)
|
||||
private static function _applyDefaultSkin($module_info)
|
||||
{
|
||||
if($module_info->is_skin_fix == 'N')
|
||||
if(isset($module_info->is_skin_fix) && $module_info->is_skin_fix == 'N')
|
||||
{
|
||||
$module_info->skin = '/USE_DEFAULT/';
|
||||
}
|
||||
|
||||
if($module_info->is_mskin_fix == 'N' && $module_info->mskin !== '/USE_RESPONSIVE/')
|
||||
if(isset($module_info->is_mskin_fix) && $module_info->is_mskin_fix == 'N' && $module_info->mskin !== '/USE_RESPONSIVE/')
|
||||
{
|
||||
$module_info->mskin = '/USE_DEFAULT/';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,16 +58,16 @@
|
|||
<label for="{$grant_name}_default" class="x_control-label">{$grant_item->title}</label>
|
||||
<div class="x_controls">
|
||||
<select name="{$grant_name}_default" id="{$grant_name}_default" class="grant_default">
|
||||
<option value="0" <!--@if($default_grant[$grant_name]=='all')-->selected="selected"<!--@end-->>{$lang->grant_to_all}</option>
|
||||
<option value="-1" <!--@if($default_grant[$grant_name]=='member' || $default_grant[$grant_name]=='site')-->selected="selected"<!--@end-->>{$lang->grant_to_login_user}</option>
|
||||
<option value="-4" <!--@if($default_grant[$grant_name]=='not_member')-->selected="selected"<!--@end-->>{$lang->grant_to_non_login_user}</option>
|
||||
<option value="-3" <!--@if($default_grant[$grant_name]=='manager')-->selected="selected"<!--@end-->>{$lang->grant_to_admin}</option>
|
||||
<option value="" <!--@if($default_grant[$grant_name]=='group')-->selected="selected"<!--@end-->>{$lang->grant_to_group}</option>
|
||||
<option value="0" <!--@if(($default_grant[$grant_name] ?? '') == 'all')-->selected="selected"<!--@end-->>{$lang->grant_to_all}</option>
|
||||
<option value="-1" <!--@if(($default_grant[$grant_name] ?? '') == 'member' || ($default_grant[$grant_name] ?? '') == 'site')-->selected="selected"<!--@end-->>{$lang->grant_to_login_user}</option>
|
||||
<option value="-4" <!--@if(($default_grant[$grant_name] ?? '') == 'not_member')-->selected="selected"<!--@end-->>{$lang->grant_to_non_login_user}</option>
|
||||
<option value="-3" <!--@if(($default_grant[$grant_name] ?? '') == 'manager')-->selected="selected"<!--@end-->>{$lang->grant_to_admin}</option>
|
||||
<option value="" <!--@if(($default_grant[$grant_name] ?? '') == 'group')-->selected="selected"<!--@end-->>{$lang->grant_to_group}</option>
|
||||
</select>
|
||||
<div id="zone_{$grant_name}" hidden style="margin:8px 0 0 0">
|
||||
<!--@foreach($group_list as $group_srl => $group_item)-->
|
||||
<label for="grant_{$grant_name}_{$group_srl}" class="x_inline">
|
||||
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" checked="checked"|cond="is_array($selected_group[$grant_name])&&in_array($group_srl,$selected_group[$grant_name])" />
|
||||
<input type="checkbox" class="checkbox" name="{$grant_name}" value="{$group_item->group_srl}" id="grant_{$grant_name}_{$group_srl}" checked="checked"|cond="is_array($selected_group[$grant_name] ?? null) && in_array($group_srl, $selected_group[$grant_name])" />
|
||||
{Context::replaceUserLang($group_item->title, true)}
|
||||
</label>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
{$lang->skin_author}
|
||||
</label>
|
||||
<div class="x_controls" style="padding-top:3px">
|
||||
<block loop="$skin_info->author=>$author">
|
||||
<block loop="$skin_info->author ?? [] => $author">
|
||||
{$author->name}
|
||||
<block cond="$author->homepage || $author->email_address">
|
||||
(<a href="{$author->homepage}" target="_blank" cond="$author->homepage">{$author->homepage}</a>
|
||||
|
|
@ -41,16 +41,16 @@
|
|||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->date}</label>
|
||||
<div class="x_controls" style="padding-top:3px">{zdate($skin_info->date, 'Y-m-d')}</div>
|
||||
<div class="x_controls" style="padding-top:3px">{zdate($skin_info->date ?? '', 'Y-m-d')}</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->license || $skin_info->license_link">
|
||||
<div class="x_control-group" cond="!empty($skin_info->license) || !empty($skin_info->license_link)">
|
||||
<label class="x_control-label">{$lang->skin_license}</label>
|
||||
<div class="x_controls" style="padding-top:3px">
|
||||
{nl2br(trim($skin_info->license))}
|
||||
<p cond="$skin_info->license_link"><a href="{$skin_info->license_link}" target="_blank">{$skin_info->license_link}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->description">
|
||||
<div class="x_control-group" cond="!empty($skin_info->description)">
|
||||
<label class="x_control-label">{$lang->description}</label>
|
||||
<div class="x_controls" style="padding-top:3px">{nl2br(trim($skin_info->description))}</div>
|
||||
</div>
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<block loop="$skin_info->extra_vars => $key, $val">
|
||||
<block cond="$val->group && ((!$group) || $group != $val->group)">
|
||||
<block cond="$val->group && (empty($group) || $group != $val->group)">
|
||||
{@$group = $val->group}
|
||||
</section>
|
||||
<section class="section">
|
||||
|
|
@ -90,10 +90,10 @@
|
|||
<label class="x_control-label" for="{$val->name}"|cond="$val->type!='text'&&$val->type!='textarea'" for="lang_{$val->name}"|cond="$val->type=='text'||$val->type=='textarea'">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<!--// text -->
|
||||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="<!--@if(strpos($val->value, '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end-->" class="lang_code" />
|
||||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="<!--@if(strpos($val->value ?? '', '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end-->" class="lang_code" />
|
||||
|
||||
<!--// textarea -->
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code"><!--@if(strpos($val->value, '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end--></textarea>
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code"><!--@if(strpos($val->value ?? '', '$user_lang->') === false)-->{$val->value}<!--@else-->{htmlspecialchars($val->value, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}<!--@end--></textarea>
|
||||
|
||||
<!--// select -->
|
||||
<select cond="$val->type == 'select'" name="{$val->name}" id="{$val->name}">
|
||||
|
|
@ -130,6 +130,6 @@
|
|||
<button class="x_btn x_btn-primary x_pull-right" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!--@if($use_colorpicker)-->
|
||||
<!--@if($use_colorpicker ?? false)-->
|
||||
<!--%load_js_plugin("spectrum")-->
|
||||
<!--@end-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue