Ejemplo n.º 1
0
            $input->theme = $form->theme;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter theme');
        }
        if ($form->hasValidData('module') && $form->module != '') {
            $input->module = $form->module;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter module name');
        }
        if ($form->hasValidData('view') && $form->view != '') {
            $input->view = $form->view;
        } else {
            $Errors[] = erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Please enter view name');
        }
        if (empty($Errors)) {
            erLhcoreClassSiteaccessGenerator::updateSiteAccess($input);
            // Clean cache
            $CacheManager = erConfigClassLhCacheConfig::getInstance();
            $CacheManager->expireCache();
            // Redirect for change to take effect
            erLhcoreClassModule::redirect('system/languages', '/(updated)/true/(sa)/' . $input->siteaccess);
            exit;
        } else {
            $tpl->set('errors', $Errors);
        }
    }
}
$cfgSite = erConfigClassLhConfig::getInstance();
$tpl->set('locales', $cfgSite->getSetting('site', 'available_site_access'));
$tpl->set('current_site_access', erLhcoreClassSystem::instance()->SiteAccess);
$tpl->set('input', $input);
		          <h2><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'options for');
    ?>
 (<?php 
    echo $input->siteaccess;
    ?>
)</h2>
					
					<div class="form-group">
    					<label><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/languages', 'Language');
    ?>
</label> 
    					<select name="language" class="form-control">
                			<?php 
    foreach (erLhcoreClassSiteaccessGenerator::getLanguages() as $language) {
        ?>
                				<option value="<?php 
        echo $language['locale'];
        ?>
" <?php 
        $siteAccessOptions['locale'] == $language['locale'] ? print 'selected="selected"' : '';
        ?>
><?php 
        echo $language['locale'];
        ?>
</option>
                			<?php 
    }
    ?>
                		</select>