<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-sm-12">
		<div class="row">
			<div class="col-sm-10">
				<h2><?php __('lblInstallJs1_title');?></h2>
			</div>
		</div><!-- /.row -->

		<p class="m-b-none"><i class="fa fa-info-circle"></i><?php __('lblInstallJs1_body');?></p>
	</div><!-- /.col-md-12 -->
</div>

<div class="row wrapper wrapper-content animated fadeInRight">
	<div class="col-lg-12">
		<?php
    	$error_code = $controller->_get->toString('err');
    	if (!empty($error_code))
    	{
    	    $titles = __('error_titles', true);
    	    $bodies = __('error_bodies', true);
    	    switch (true)
    	    {
    	        case in_array($error_code, array('AO01')):
    	            ?>
    				<div class="alert alert-success">
    					<i class="fa fa-check m-r-xs"></i>
    					<strong><?php echo @$titles[$error_code]; ?></strong>
    					<?php echo @$bodies[$error_code]?>
    				</div>
    				<?php
    				break;
    		}
    	}
    	?>
		<div class="tabs-container tabs-reservations m-b-lg">
			<ul class="nav nav-tabs" role="tablist">
				<li role="presentation" class="active"><a href="#tab-install" aria-controls="tab-install" role="tab" data-toggle="tab"><?php __('menuInstall'); ?></a></li>
				<li role="presentation"><a href="#tab-seo" aria-controls="tab-seo" role="tab" data-toggle="tab"><?php __('menuSeo'); ?></a></li>
			</ul>
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="tab-install">
					<div class="panel-body">
						<form action="index.php?controller=pjAdminOptions&action=pjActionInstall" method="post">
			<input type="hidden" name="csrf_token" value="<?php echo pjAppController::getCsrfToken(); ?>">
							<div class="m-b-lg">
								<h2 class="no-margins"><?php __('lblInstallOptions'); ?></h2>
							</div>
							<div class="row">
                        		<div class="col-md-6 col-sm-12">
                                    <div class="form-group">
                                        <label class="control-label"><?php __('lblInstallUrl'); ?></label>
    
                                        <div class="input-group">
											<span class="input-group-addon"><i class="fa fa-globe"></i></span>
		                                	<input type="text" name="o_install_url" id="o_install_url" value="<?php echo pjSanitize::html($tpl['option_arr']['o_install_url']);?>" class="form-control" maxlength="255" >
		                                </div>
                                    </div>
                                </div>
								<div class="col-md-3 col-sm-6">
                                    <div class="form-group">
                                        <label class="control-label"><?php __('lblPagePrefix'); ?></label>
    
                                        <input type="text" name="o_page_prefix" id="o_page_prefix" class="form-control" value="<?php echo pjSanitize::html($tpl['option_arr']['o_page_prefix']); ?>" data-msg-required="<?php __('plugin_base_this_field_is_required', false, true);?>" />
                                    </div>
                                </div>
                                <div class="col-md-3 col-sm-6">
                                    <div class="form-group">
                                        <label class="control-label">&nbsp;</label>
    
                                        <div class="clearfix">
			                                <button type="submit" class="ladda-button btn btn-primary btn-phpjabbers-loader pull-left" data-style="zoom-in" style="margin-right: 15px;">
			                                    <span class="ladda-label"><?php __('btnSave'); ?></span>
			                                    <?php include $controller->getConstant('pjBase', 'PLUGIN_VIEWS_PATH') . 'pjLayouts/elements/button-animation.php'; ?>
			                                </button>
			                            </div><!-- /.clearfix -->
                                    </div>
                                </div>
                        	</div>
						</form>
						<div class="hr-line-dashed"></div>
						<form action="" method="get" class="form-horizontal">
							<div class="m-b-lg">
								<h2 class="no-margins"><?php  echo $tpl['is_flag_ready'] ? __('lblInstallConfig', true) : __('menuCategories', true); ?></h2>
							</div>
							<div class="row">
								<div class="col-lg-8">
									<div class="form-group">
										<label class="col-lg-3 col-md-4 control-label"><?php __('lblInstallCategory'); ?></label>
										<div class="col-lg-7 col-md-8">
											<select name="install_category" id="install_category" class="form-control">
												<option value="">-- <?php __('lblAllCatgories'); ?> --</option>
												<?php
												foreach ($tpl['category_arr'] as $category)
												{
													?><option value="<?php echo $category['data']['id']; ?>"><?php echo str_repeat("-----", $category['deep']) . " " .pjSanitize::html($category['data']['name']); ?></option><?php
												}
												?>
											</select>
										</div>
									</div>
								</div>
							</div>
							
							<div style="display: <?php echo $tpl['is_flag_ready'] ? null : 'none';?>">						
								<div class="row">
									<div class="col-lg-8">
										<div class="form-group">
											<label class="col-lg-3 col-md-4 control-label"><?php __('lblInstallConfigLocale'); ?></label>
											<div class="col-lg-7 col-md-8">
												<select name="install_locale" id="install_locale" class="form-control">
													<option value="">-- <?php __('lblChoose'); ?> --</option>
													<?php
													foreach ($tpl['locale_arr'] as $locale)
													{
														?><option value="<?php echo $locale['id']; ?>"><?php echo pjSanitize::html($locale['title']); ?></option><?php
													}
													?>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-lg-3 col-md-4 control-label"><?php __('lblInstallConfigHide'); ?></label>
											<div class="col-lg-7 col-md-8">
												<div class="clearfix">
													<div class="switch onoffswitch-data pull-left">
														<div class="onoffswitch">
															<input type="checkbox" class="onoffswitch-checkbox" id="install_hide" name="install_hide" value="1">
															<label class="onoffswitch-label" for="install_hide">
															<span class="onoffswitch-inner" data-on="Yes" data-off="No"></span>
															<span class="onoffswitch-switch"></span>
															</label>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="m-b-lg">
								<h2 class="no-margins"><?php __('lblInstallCode'); ?></h2>
							</div>
							<p class="alert alert-info alert-with-icon m-t-xs">
								<?php __('lblInstallJs1_1');?>
								<i class="fa fa-info-circle"></i><?php __('lblInstallCodeDesc'); ?>
							</p>
							
							<div class="row">
						<div class="col-lg-12">
							<div class="form-group">
								<div class="col-xs-12">
									<textarea class="form-control textarea_install" id="install_code" rows="4">
&lt;link href="<?php echo PJ_INSTALL_URL.PJ_FRAMEWORK_LIBS_PATH . 'pj/css/'; ?>pj.bootstrap.min.css" type="text/css" rel="stylesheet" /&gt;
&lt;link href="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionLoadCss" type="text/css" rel="stylesheet" /&gt;
&lt;script type="text/javascript" src="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionLoad"&gt;&lt;/script&gt;</textarea>
								</div>
							</div>
						</div>
						<div style="display:none" id="hidden_code">&lt;link href="<?php echo PJ_INSTALL_URL.PJ_FRAMEWORK_LIBS_PATH . 'pj/css/'; ?>pj.bootstrap.min.css" type="text/css" rel="stylesheet" /&gt;
&lt;link href="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionLoadCss" type="text/css" rel="stylesheet" /&gt;
&lt;script type="text/javascript" src="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionLoad"&gt;&lt;/script&gt;</div>
					</div>
							<p class="alert alert-info alert-with-icon m-t-xs">
								<i class="fa fa-info-circle"></i><?php __('lblInstallJs2_1'); ?>
							</p>
							<div class="row">
								<div class="col-lg-12">
									<div class="form-group">
										<div class="col-xs-12">
											<textarea class="form-control textarea_install" rows="2">&lt;!doctype html&gt;</textarea>
										</div>
									</div>
								</div>
							</div>
							<p class="alert alert-info alert-with-icon m-t-xs">
								<i class="fa fa-info-circle"></i><?php __('lblInstallJs2_2'); ?>
							</p>
							<div class="row">
								<div class="col-lg-12">
									<div class="form-group">
										<div class="col-xs-12">
											<textarea class="form-control textarea_install" rows="2">&lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
	&lt;meta name="viewport" content="width=device-width"&gt;</textarea>
										</div>
									</div>
								</div>
							</div>
							
						</form>
					</div>
				</div>
				<div role="tabpanel" class="tab-pane " id="tab-seo">
					<div class="panel-body">
						<p class="alert alert-info alert-with-icon m-t-xs">
							<i class="fa fa-info-circle"></i><?php __('lblInstallSeo_1'); ?>
						</p>
						<div class="form-group">
							<input type="text" id="uri_page" class="form-control" value="myPage.php" />
						</div>
						<p class="alert alert-info alert-with-icon m-t-xs">
							<i class="fa fa-info-circle"></i><?php __('lblInstallSeo_2'); ?>
						</p>
						<div class="form-group">
							<textarea class="form-control textarea_install" rows="2">
&lt;meta name="fragment" content="!"&gt;</textarea>
						</div>
						<p class="alert alert-info alert-with-icon m-t-xs">
							<i class="fa fa-info-circle"></i><?php __('lblInstallSeo_3'); ?>
						</p>
						<div class="form-group">
							<textarea class="form-control textarea_install" id="install_htaccess" rows="4">
RewriteEngine On
RewriteCond %{QUERY_STRING} _escaped_fragment_=(.*)
RewriteRule ^myPage.php <?php echo PJ_INSTALL_FOLDER; ?>index.php?controller=pjFrontPublic&action=pjActionRouter&_escaped_fragment_=%1 [L,NC]</textarea>

			<div style="display: none" id="hidden_htaccess">RewriteEngine On
RewriteCond %{QUERY_STRING} _escaped_fragment_=(.*)
RewriteRule ^::URI_PAGE:: <?php echo PJ_INSTALL_FOLDER; ?>index.php?controller=pjFrontPublic&action=pjActionRouter&_escaped_fragment_=%1 [L,NC]</div>
						</div>
						
						<p class="alert alert-info alert-with-icon m-t-xs">
							<i class="fa fa-info-circle"></i><?php __('lblInstallSeo_4'); ?>
						</p>
						<div class="form-group">
							<textarea class="form-control textarea_install" id="install_htaccess_remote" rows="4">
RewriteEngine On
RewriteCond %{QUERY_STRING} _escaped_fragment_=(.*)
RewriteRule ^myPage.php <?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFrontPublic&action=pjActionRouter&_escaped_fragment_=%1 [L,NC,R=302]</textarea>

			<div style="display: none" id="hidden_htaccess_remote">RewriteEngine On
RewriteCond %{QUERY_STRING} _escaped_fragment_=(.*)
RewriteRule ^::URI_PAGE:: <?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFrontPublic&action=pjActionRouter&_escaped_fragment_=%1 [L,NC,R=302]</div>
						</div>
						
					</div>
				</div>
			</div>
		</div>
	</div>
</div>