mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Move remainder of general config into advanced config screen, and replace general config screen with domain list
This commit is contained in:
parent
393a90c022
commit
b2157d2421
8 changed files with 121 additions and 330 deletions
|
|
@ -500,58 +500,6 @@ class adminAdminController extends admin
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update general configuration.
|
||||
*/
|
||||
function procAdminUpdateConfigGeneral()
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$vars = Context::getRequestVars();
|
||||
|
||||
// Site title and HTML footer
|
||||
$args = new stdClass;
|
||||
$args->siteTitle = $vars->site_title;
|
||||
$args->siteSubtitle = $vars->site_subtitle;
|
||||
$args->htmlFooter = $vars->html_footer;
|
||||
$oModuleController->updateModuleConfig('module', $args);
|
||||
|
||||
// Index module
|
||||
$domain_args = new stdClass();
|
||||
$domain_args->domain_srl = 0;
|
||||
$domain_args->index_module_srl = $vars->index_module_srl;
|
||||
executeQuery('module.updateDomain', $domain_args);
|
||||
|
||||
// Default and enabled languages
|
||||
$enabled_lang = $vars->enabled_lang;
|
||||
if (!in_array($vars->default_lang, $enabled_lang))
|
||||
{
|
||||
$enabled_lang[] = $vars->default_lang;
|
||||
}
|
||||
Rhymix\Framework\Config::set('locale.default_lang', $vars->default_lang);
|
||||
Rhymix\Framework\Config::set('locale.enabled_lang', array_values($enabled_lang));
|
||||
Rhymix\Framework\Config::set('locale.auto_select_lang', $vars->auto_select_lang === 'Y');
|
||||
|
||||
// Default time zone
|
||||
Rhymix\Framework\Config::set('locale.default_timezone', $vars->default_timezone);
|
||||
|
||||
// Mobile view
|
||||
Rhymix\Framework\Config::set('mobile.enabled', $vars->use_mobile_view === 'Y');
|
||||
Rhymix\Framework\Config::set('mobile.tablets', $vars->tablets_as_mobile === 'Y');
|
||||
if (Rhymix\Framework\Config::get('use_mobile_view') !== null)
|
||||
{
|
||||
Rhymix\Framework\Config::set('use_mobile_view', $vars->use_mobile_view === 'Y');
|
||||
}
|
||||
|
||||
// Save
|
||||
if (!Rhymix\Framework\Config::save())
|
||||
{
|
||||
return new Object(-1, 'msg_failed_to_save_config');
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
$this->setRedirectUrl(Context::get('success_return_url') ?: getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminConfigGeneral'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update notification configuration.
|
||||
*/
|
||||
|
|
@ -783,6 +731,25 @@ class adminAdminController extends admin
|
|||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('document', $document_config);
|
||||
|
||||
// Mobile view
|
||||
Rhymix\Framework\Config::set('mobile.enabled', $vars->use_mobile_view === 'Y');
|
||||
Rhymix\Framework\Config::set('mobile.tablets', $vars->tablets_as_mobile === 'Y');
|
||||
if (Rhymix\Framework\Config::get('use_mobile_view') !== null)
|
||||
{
|
||||
Rhymix\Framework\Config::set('use_mobile_view', $vars->use_mobile_view === 'Y');
|
||||
}
|
||||
|
||||
// Languages and time zone
|
||||
$enabled_lang = $vars->enabled_lang;
|
||||
if (!in_array($vars->default_lang, $enabled_lang))
|
||||
{
|
||||
$enabled_lang[] = $vars->default_lang;
|
||||
}
|
||||
Rhymix\Framework\Config::set('locale.default_lang', $vars->default_lang);
|
||||
Rhymix\Framework\Config::set('locale.enabled_lang', array_values($enabled_lang));
|
||||
Rhymix\Framework\Config::set('locale.auto_select_lang', $vars->auto_select_lang === 'Y');
|
||||
Rhymix\Framework\Config::set('locale.default_timezone', $vars->default_timezone);
|
||||
|
||||
// Other settings
|
||||
Rhymix\Framework\Config::set('use_rewrite', $vars->use_rewrite === 'Y');
|
||||
Rhymix\Framework\Config::set('use_sso', $vars->use_sso === 'Y');
|
||||
|
|
@ -1133,7 +1100,7 @@ class adminAdminController extends admin
|
|||
Rhymix\Framework\Cache::clearGroup('site_and_module');
|
||||
|
||||
// Redirect to the domain list.
|
||||
$this->setRedirectUrl(Context::get('success_return_url') ?: getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminConfigDomains'));
|
||||
$this->setRedirectUrl(Context::get('success_return_url') ?: getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminConfigGeneral'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -407,42 +407,30 @@ class adminAdminView extends admin
|
|||
*/
|
||||
function dispAdminConfigGeneral()
|
||||
{
|
||||
// Default and enabled languages
|
||||
Context::set('supported_lang', Rhymix\Framework\Lang::getSupportedList());
|
||||
Context::set('default_lang', Rhymix\Framework\Config::get('locale.default_lang'));
|
||||
Context::set('enabled_lang', Rhymix\Framework\Config::get('locale.enabled_lang'));
|
||||
Context::set('auto_select_lang', Rhymix\Framework\Config::get('locale.auto_select_lang'));
|
||||
|
||||
// Site title and HTML footer
|
||||
// Get domain list.
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('module');
|
||||
Context::set('var_site_title', escape($config->siteTitle));
|
||||
Context::set('var_site_subtitle', escape($config->siteSubtitle));
|
||||
Context::set('all_html_footer', escape($config->htmlFooter));
|
||||
$page = intval(Context::get('page')) ?: 1;
|
||||
$domain_list = $oModuleModel->getAllDomains(20, $page);
|
||||
Context::set('domain_list', $domain_list);
|
||||
Context::set('page_navigation', $domain_list->page_navigation);
|
||||
Context::set('page', $page);
|
||||
|
||||
// Index module
|
||||
$columnList = array('modules.mid', 'modules.browser_title', 'index_module_srl');
|
||||
$start_module = $oModuleModel->getSiteInfo(0, $columnList);
|
||||
Context::set('start_module', $start_module);
|
||||
// Get index module info.
|
||||
$module_list = array();
|
||||
$oModuleModel = getModel('module');
|
||||
foreach ($domain_list->data as $domain)
|
||||
{
|
||||
if ($domain->index_module_srl && !isset($module_list[$domain->index_module_srl]))
|
||||
{
|
||||
$module_list[$domain->index_module_srl] = $oModuleModel->getModuleInfoByModuleSrl($domain->index_module_srl);
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// Default time zone
|
||||
Context::set('timezones', Rhymix\Framework\DateTime::getTimezoneList());
|
||||
Context::set('selected_timezone', Rhymix\Framework\Config::get('locale.default_timezone'));
|
||||
// Get language list.
|
||||
Context::set('supported_lang', Rhymix\Framework\Lang::getSupportedList());
|
||||
|
||||
// Mobile view
|
||||
Context::set('use_mobile_view', (config('mobile.enabled') !== null ? config('mobile.enabled') : config('use_mobile_view')) ? true : false);
|
||||
Context::set('tablets_as_mobile', config('mobile.tablets') ? true : false);
|
||||
|
||||
// Favicon and mobicon and site default image
|
||||
$oAdminModel = getAdminModel('admin');
|
||||
$favicon_url = $oAdminModel->getFaviconUrl(false) ?: $oAdminModel->getFaviconUrl();
|
||||
$mobicon_url = $oAdminModel->getMobileIconUrl(false) ?: $oAdminModel->getMobileIconUrl();
|
||||
$site_default_image_url = $oAdminModel->getSiteDefaultImageUrl();
|
||||
Context::set('favicon_url', $favicon_url);
|
||||
Context::set('mobicon_url', $mobicon_url);
|
||||
Context::set('site_default_image_url', $site_default_image_url);
|
||||
|
||||
$this->setTemplateFile('config_general');
|
||||
$this->setTemplateFile('config_domains');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -554,8 +542,20 @@ class adminAdminView extends admin
|
|||
$config = $oDocumentModel->getDocumentConfig();
|
||||
Context::set('thumbnail_type', $config->thumbnail_type ?: 'crop');
|
||||
|
||||
// Default and enabled languages
|
||||
Context::set('supported_lang', Rhymix\Framework\Lang::getSupportedList());
|
||||
Context::set('default_lang', Rhymix\Framework\Config::get('locale.default_lang'));
|
||||
Context::set('enabled_lang', Rhymix\Framework\Config::get('locale.enabled_lang'));
|
||||
Context::set('auto_select_lang', Rhymix\Framework\Config::get('locale.auto_select_lang'));
|
||||
|
||||
// Default time zone
|
||||
Context::set('timezones', Rhymix\Framework\DateTime::getTimezoneList());
|
||||
Context::set('selected_timezone', Rhymix\Framework\Config::get('locale.default_timezone'));
|
||||
|
||||
// Other settings
|
||||
Context::set('use_rewrite', Rhymix\Framework\Config::get('use_rewrite'));
|
||||
Context::set('use_mobile_view', (config('mobile.enabled') !== null ? config('mobile.enabled') : config('use_mobile_view')) ? true : false);
|
||||
Context::set('tablets_as_mobile', config('mobile.tablets') ? true : false);
|
||||
Context::set('use_sso', Rhymix\Framework\Config::get('use_sso'));
|
||||
Context::set('use_ssl', Rhymix\Framework\Config::get('url.ssl'));
|
||||
Context::set('delay_session', Rhymix\Framework\Config::get('session.delay'));
|
||||
|
|
@ -570,38 +570,6 @@ class adminAdminView extends admin
|
|||
$this->setTemplateFile('config_advanced');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Debug Settings page
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminConfigDomains()
|
||||
{
|
||||
// Get domain list.
|
||||
$oModuleModel = getModel('module');
|
||||
$page = intval(Context::get('page')) ?: 1;
|
||||
$domain_list = $oModuleModel->getAllDomains(20, $page);
|
||||
Context::set('domain_list', $domain_list);
|
||||
Context::set('page_navigation', $domain_list->page_navigation);
|
||||
Context::set('page', $page);
|
||||
|
||||
// Get index module info.
|
||||
$module_list = array();
|
||||
$oModuleModel = getModel('module');
|
||||
foreach ($domain_list->data as $domain)
|
||||
{
|
||||
if ($domain->index_module_srl && !isset($module_list[$domain->index_module_srl]))
|
||||
{
|
||||
$module_list[$domain->index_module_srl] = $oModuleModel->getModuleInfoByModuleSrl($domain->index_module_srl);
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// Get language list.
|
||||
Context::set('supported_lang', Rhymix\Framework\Lang::getSupportedList());
|
||||
|
||||
$this->setTemplateFile('config_domains');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Debug Settings page
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
<action name="dispAdminConfigNotification" type="view" menu_name="adminConfigurationGeneral" />
|
||||
<action name="dispAdminConfigSecurity" type="view" menu_name="adminConfigurationGeneral" />
|
||||
<action name="dispAdminConfigAdvanced" type="view" menu_name="adminConfigurationGeneral" />
|
||||
<action name="dispAdminConfigDomains" type="view" menu_name="adminConfigurationDomains" />
|
||||
<action name="dispAdminConfigDebug" type="view" menu_name="adminConfigurationGeneral" />
|
||||
<action name="dispAdminConfigSEO" type="view" menu_name="adminConfigurationGeneral" />
|
||||
<action name="dispAdminConfigSitelock" type="view" menu_name="adminConfigurationGeneral" />
|
||||
|
|
@ -26,7 +25,6 @@
|
|||
<action name="procAdminUpdateConfig" type="controller" />
|
||||
<action name="procAdminDeleteLogo" type="controller" />
|
||||
<action name="procAdminMenuReset" type="controller" />
|
||||
<action name="procAdminUpdateConfigGeneral" type="controller" />
|
||||
<action name="procAdminUpdateNotification" type="controller" />
|
||||
<action name="procAdminUpdateSecurity" type="controller" />
|
||||
<action name="procAdminUpdateAdvanced" type="controller" />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$lang->admin = 'Admin';
|
||||
$lang->cmd_configure = 'Configure';
|
||||
$lang->subtitle_primary = 'General';
|
||||
$lang->subtitle_site_info = 'Site';
|
||||
$lang->subtitle_notification = 'Notifications';
|
||||
$lang->subtitle_security = 'Security';
|
||||
$lang->subtitle_advanced = 'Advanced';
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
$lang->admin = '관리자';
|
||||
$lang->cmd_configure = '설정하기';
|
||||
$lang->subtitle_primary = '기본 설정';
|
||||
$lang->subtitle_site_info = '사이트 설정';
|
||||
$lang->subtitle_notification = '알림 설정';
|
||||
$lang->subtitle_security = '보안 설정';
|
||||
$lang->subtitle_advanced = '고급 설정';
|
||||
$lang->subtitle_domains = '도메인 설정';
|
||||
$lang->subtitle_debug = '디버그 설정';
|
||||
$lang->subtitle_seo = 'SEO 설정';
|
||||
$lang->subtitle_etc = '기타';
|
||||
|
|
|
|||
|
|
@ -14,6 +14,72 @@
|
|||
<label for="use_rewrite_n" class="x_inline"><input type="radio" name="use_rewrite" id="use_rewrite_n" value="N" checked="checked"|cond="!$use_rewrite" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_mobile_view}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_mobile_view_y" class="x_inline">
|
||||
<input type="radio" name="use_mobile_view" id="use_mobile_view_y" value="Y" checked="checked"|cond="$use_mobile_view" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="use_mobile_view_n" class="x_inline">
|
||||
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="!$use_mobile_view" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->tablets_as_mobile}</label>
|
||||
<div class="x_controls">
|
||||
<label for="tablets_as_mobile_y" class="x_inline">
|
||||
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_y" value="Y" checked="checked"|cond="$tablets_as_mobile" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="tablets_as_mobile_n" class="x_inline">
|
||||
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_n" value="N" checked="checked"|cond="!$tablets_as_mobile" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->auto_select_lang}</label>
|
||||
<div class="x_controls">
|
||||
<label for="auto_select_lang_y" class="x_inline">
|
||||
<input type="radio" name="auto_select_lang" id="auto_select_lang_y" value="Y" checked="checked"|cond="$auto_select_lang" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="auto_select_lang_n" class="x_inline">
|
||||
<input type="radio" name="auto_select_lang" id="auto_select_lang_n" value="N" checked="checked"|cond="!$auto_select_lang" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_auto_select_lang}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->lang_select}</label>
|
||||
<div class="x_controls">
|
||||
<label for="lang_{$key}" class="x_inline" loop="$supported_lang=>$key,$val">
|
||||
<input type="checkbox" name="enabled_lang[]" id="lang_{$key}" value="{$key}" disabled="disabled"|cond="$key==$default_lang" checked="checked"|cond="in_array($key, $enabled_lang)" />
|
||||
{$val['name']}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="default_lang" class="x_control-label">{$lang->default_lang}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_lang" id="default_lang">
|
||||
<option value="{$key}" loop="$enabled_lang=>$key" selected="selected"|cond="$key==$default_lang">{$supported_lang[$key]['name']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="default_timezone">{$lang->timezone}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_timezone">
|
||||
<option loop="$timezones => $key,$val" value="{$key}" selected="selected"|cond="$key==$selected_timezone">{$val}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_db_session}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -1,206 +0,0 @@
|
|||
<include target="config_header.html" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/config_general/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<section class="section">
|
||||
<form action="./" method="post" enctype="multipart/form-data" id="config_form" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procAdminUpdateConfigGeneral" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/config_general/1" />
|
||||
<div></div>
|
||||
</form>
|
||||
<div class="x_form-horizontal" id="admin_config">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->site_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="site_title" value="{$var_site_title}" class="lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->site_subtitle}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="site_subtitle" value="{$var_site_subtitle}" class="lang_code" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="_target_module">{$lang->start_module}</label>
|
||||
<div class="x_controls">
|
||||
<input class="module_search" type="text" name="index_module_srl" value="{$start_module->index_module_srl}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="html_footer">{$lang->input_footer_script}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea name="html_footer" id="html_footer" rows="6" style="width:100%" placeholder="{$lang->detail_input_footer_script}" title="{$lang->detail_input_footer_script}">{$all_html_footer}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="default_lang" class="x_control-label">{$lang->default_lang}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_lang" id="default_lang">
|
||||
<option value="{$key}" loop="$enabled_lang=>$key" selected="selected"|cond="$key==$default_lang">{$supported_lang[$key]['name']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->lang_select}</label>
|
||||
<div class="x_controls">
|
||||
<label for="lang_{$key}" class="x_inline" loop="$supported_lang=>$key,$val">
|
||||
<input type="checkbox" name="enabled_lang[]" id="lang_{$key}" value="{$key}" disabled="disabled"|cond="$key==$default_lang" checked="checked"|cond="in_array($key, $enabled_lang)" />
|
||||
{$val['name']}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->auto_select_lang}</label>
|
||||
<div class="x_controls">
|
||||
<label for="auto_select_lang_y" class="x_inline">
|
||||
<input type="radio" name="auto_select_lang" id="auto_select_lang_y" value="Y" checked="checked"|cond="$auto_select_lang" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="auto_select_lang_n" class="x_inline">
|
||||
<input type="radio" name="auto_select_lang" id="auto_select_lang_n" value="N" checked="checked"|cond="!$auto_select_lang" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<br />
|
||||
<p class="x_help-block">{$lang->about_auto_select_lang}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="default_timezone">{$lang->timezone}</label>
|
||||
<div class="x_controls">
|
||||
<select name="default_timezone">
|
||||
<option loop="$timezones => $key,$val" value="{$key}" selected="selected"|cond="$key==$selected_timezone">{$val}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->use_mobile_view}</label>
|
||||
<div class="x_controls">
|
||||
<label for="use_mobile_view_y" class="x_inline">
|
||||
<input type="radio" name="use_mobile_view" id="use_mobile_view_y" value="Y" checked="checked"|cond="$use_mobile_view" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="use_mobile_view_n" class="x_inline">
|
||||
<input type="radio" name="use_mobile_view" id="use_mobile_view_n" value="N" checked="checked"|cond="!$use_mobile_view" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->tablets_as_mobile}</label>
|
||||
<div class="x_controls">
|
||||
<label for="tablets_as_mobile_y" class="x_inline">
|
||||
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_y" value="Y" checked="checked"|cond="$tablets_as_mobile" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="tablets_as_mobile_n" class="x_inline">
|
||||
<input type="radio" name="tablets_as_mobile" id="tablets_as_mobile_n" value="N" checked="checked"|cond="!$tablets_as_mobile" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_use_favicon}</label>
|
||||
<div class="x_controls">
|
||||
<p id="faviconPreview">
|
||||
<img src="{$favicon_url}" alt="Favicon" class="fn1" style="width:16px;height:16px">
|
||||
<img src="{$favicon_url}" alt="Favicon" class="fn2" style="width:16px;height:16px">
|
||||
</p>
|
||||
<label><input type="checkbox" name="is_delete_favicon" value="1" /> {$lang->cmd_delete}</label>
|
||||
<form action="./" enctype="multipart/form-data" method="post" target="hiddenIframe" class="imageUpload" style="margin:0">
|
||||
<input type="hidden" name="module" value="admin">
|
||||
<input type="hidden" name="act" value="procAdminFaviconUpload">
|
||||
<p>
|
||||
<input type="file" name="favicon" id="favicon" title="Favicon"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_upload}" style="vertical-align:top">
|
||||
</p>
|
||||
</form>
|
||||
<span class="x_help-block">{$lang->about_use_favicon}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_use_mobile_icon}</label>
|
||||
<div class="x_controls">
|
||||
<p id="mobiconPreview">
|
||||
<img src="{$mobicon_url}" alt="Mobile Home Icon" width="32" height="32" />
|
||||
<span>Rhymix</span>
|
||||
</p>
|
||||
<label><input type="checkbox" name="is_delete_mobicon" value="1" /> {$lang->cmd_delete}</label>
|
||||
<form action="./" enctype="multipart/form-data" method="post" target="hiddenIframe" class="imageUpload" style="margin:0">
|
||||
<input type="hidden" name="module" value="admin">
|
||||
<input type="hidden" name="act" value="procAdminFaviconUpload">
|
||||
<p>
|
||||
<input type="file" name="mobicon" id="mobicon" title="Mobile Home Icon"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_upload}" style="vertical-align:top">
|
||||
</p>
|
||||
</form>
|
||||
<span class="x_help-block">{$lang->detail_use_mobile_icon}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->cmd_site_default_image}</label>
|
||||
<div class="x_controls">
|
||||
<p id="default_imagePreview">
|
||||
<img src="{$site_default_image_url}" alt="Default Image" style="width:200px;height:auto" />
|
||||
</p>
|
||||
<label><input type="checkbox" name="is_delete_default_image" value="1" /> {$lang->cmd_delete}</label>
|
||||
<form action="./" enctype="multipart/form-data" method="post" target="hiddenIframe" class="imageUpload" style="margin:0">
|
||||
<input type="hidden" name="module" value="admin">
|
||||
<input type="hidden" name="act" value="procAdminFaviconUpload">
|
||||
<p>
|
||||
<input type="file" name="default_image" id="default_image" title="Site default image"/>
|
||||
<input class="x_btn" type="submit" value="{$lang->cmd_upload}" style="vertical-align:top">
|
||||
</p>
|
||||
</form>
|
||||
<span class="x_help-block">{$lang->about_site_default_image}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary" onclick="doSubmitConfig()">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<iframe name="hiddenIframe" src="about:blank" hidden></iframe>
|
||||
<script>
|
||||
jQuery(function() {
|
||||
if (jQuery("#default_imagePreview img").attr("src") == "") {
|
||||
jQuery("#default_imagePreview").hide();
|
||||
jQuery("input[name='is_delete_default_image']").parent().hide();
|
||||
}
|
||||
});
|
||||
|
||||
function afterUploadConfigImage(name, tmpFileName) {
|
||||
jQuery('#' + name + 'Preview img').attr('src', tmpFileName).parent().show();
|
||||
jQuery('#' + name).val('');
|
||||
jQuery("input[name='is_delete_" + name + "']").prop('checked', false).parent().show();
|
||||
}
|
||||
|
||||
function alertUploadMessage(msg) {
|
||||
alert(msg);
|
||||
}
|
||||
|
||||
function doSubmitConfig()
|
||||
{
|
||||
var $forms = jQuery('#admin_config').find('input[name][type="hidden"], input[name][type="text"], input[name][type="checkbox"]:checked, select[name], textarea[name], input[name][type="radio"]:checked');
|
||||
var $configForm = jQuery('#config_form');
|
||||
var $container = $configForm.children('div');
|
||||
$container.empty();
|
||||
|
||||
$forms.each(function($)
|
||||
{
|
||||
var $this = jQuery(this);
|
||||
|
||||
if($this.parents('.imageUpload').length) return;
|
||||
|
||||
var $input = jQuery('<input>').attr('type', 'hidden').attr('name', $this.attr('name')).val($this.val());
|
||||
$container.append($input);
|
||||
});
|
||||
$configForm.submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -4,11 +4,10 @@
|
|||
<h1>{$lang->menu_gnb_sub['adminConfigurationGeneral']} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_general" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigGeneral'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigGeneral')}">{$lang->subtitle_primary}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigGeneral' || preg_match('/^dispAdmin.+Domain/', $act)"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigGeneral')}">{$lang->subtitle_site_info}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigNotification'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigNotification')}">{$lang->subtitle_notification}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigSecurity'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigSecurity')}">{$lang->subtitle_security}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigAdvanced'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigAdvanced')}">{$lang->subtitle_advanced}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigDomains' || preg_match('/^dispAdmin.+Domain/', $act)"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigDomains')}">{$lang->subtitle_domains}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigDebug'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigDebug')}">{$lang->subtitle_debug}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigSEO'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigSEO')}">{$lang->subtitle_seo}</a></li>
|
||||
<li class="x_active"|cond="$act == 'dispAdminConfigSitelock'"><a href="{getUrl('', 'module', 'admin', 'act', 'dispAdminConfigSitelock')}">{$lang->subtitle_sitelock}</a></li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue