Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
-
- <?php
- use dosamigosselectizeSelectizeDropDownList;
- use kartikfileFileInput;
- use yiiflagsFlags;
- use yiihelpersHtml;
- use yiihelpersUrl;
- use yiiwebJsExpression;
- use yiiwidgetsBreadcrumbs;
- $this->title = Html::encode(Yii::$app->settings->get('site', 'title_translate'));
- $this->registerMetaTag(['description' => Yii::$app->settings->get('site', 'description_translate')]);
- $this->params['breadcrumbs'][] = $this->title;
- $languages = array_map(function(appmodelsLanguage $language) {
- return [
- $language->id => Flags::widget([
- 'flag' => $language->icon,
- 'type' => Flags::FLAT_24,
- 'useSprite' => false
- ]) . ' ' . '<span class="lng-drop">' . $language->language . '</span>',
- ];
- }, $languages);
- $sources = array_map(function(appmodelsLanguage $source) {
- return [
- $source->id => Flags::widget([
- 'flag' => $source->icon,
- 'type' => Flags::FLAT_24,
- 'useSprite' => false
- ]) . ' ' . '<span class="lng-drop">' . $source->language . '</span>',
- ];
- }, $sources);
- ?>
- <?= $this->render('_header_breadcrumbs') ?>
- <div class="container">
- <div class="row">
- <form class="col-md-9 ">
- <ul class="timeline-2">
- <li class="animated fadeInRight animation-delay-10">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">1</span></time>
- <div class="panel panel-royal panel-class" style="border-radius:5px; margin-bottom: 70px;">
- </li>
- <li class="animated fadeInRight animation-delay-8 timeline-language">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">2</span></time>
- <div class="">
- <div class="form-group">
- <label for="select">My Source Language</label>
- <?= SelectizeDropDownList::widget([
- 'options' => [
- 'id' => 'sourceLangSelect',
- 'class' => 'sourceLangSelect cookieset',
- ],
- 'name' => 'tags',
- 'value' => 41, // initial value
- // 'value'=>new JsExpression(' alert("hello") ; $.cookie("sourceLangSelect")'),
- 'items' => $sources,
- 'clientOptions' => [
- 'placeholder' => 'Select source language',
- 'optgroups' => false,
- 'render' => [
- 'option' => new JsExpression('function(item) {
- return '<div>' + item.text + '</div>';
- }'),
- 'item' => new JsExpression('function(item) {
- return '<div>' + item.text + '</div>';
- }'),
- ],
- 'onInitialize' => new JsExpression('function() {
- $('#sourceLangSelect').trigger('selectizeInit');
- }'),
- ],
- ]);?>
- </div>
- <i class="fa fa-arrow-down fa-2x"></i>
- <div class="form-group">
- <label for="select">My Target Language(s)</label>
- <?= SelectizeDropDownList::widget([
- 'options' => [
- 'id' => 'targetLangSelect',
- 'class' => 'targetLangSelect cookieset',
- ],
- 'name' => 'tags',
- 'items' => $languages,
- 'clientOptions' => [
- 'placeholder' => 'Select target language',
- 'maxItems' => null,
- 'optgroups' => false,
- 'render' => [
- 'option' => new JsExpression('function(item) {
- return '<div>' + item.text + '</div>';
- }'),
- 'item' => new JsExpression('function(item) {
- return '<div>' + item.text + '</div>';
- }'),
- ],
- 'onInitialize' => new JsExpression('function() {
- $('#targetLangSelect').trigger('selectizeInit');
- }'),
- ],
- ]);?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </li>
- <li class="animated fadeInRight animation-delay-6">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">3</span></time>
- <ul class="expert-block cookieset">
- <?php foreach ($experts as $expert) :?>
- <li> <i class="<?=$expert->icon?>"></i> <span id="<?=$expert->id?>" class="name"><?=$expert->name?></span>
- <p class="description"><?=$expert->description?></p>
- </li>
- <?php endforeach; ?>
- </ul>
- </div>
- </div>
- </li>
- <li class="animated fadeInRight animation-delay-2 timeline-input-file">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">4</span></time>
- <?php echo '<label class="control-label">Add Attachments</label>';
- echo FileInput::widget([
- 'id' => 'input-id',
- 'name' => 'attachment_3[]',
- 'options'=>[
- 'multiple'=>true
- ],
- 'pluginOptions' => [
- 'previewFileType' => 'any',
- 'showPreview' => true,
- 'showCaption' => true,
- 'showRemove' => false,
- 'showUpload' => false,
- 'maxFileSize'=>2500000,
- 'uploadUrl' => yiihelpersUrl::to(['/site/upload-any-file']),
- 'fileActionSettings' => [
- 'showZoom' => false,
- 'showRemove' => true,
- 'showUpload' => false,
- ],
- 'layoutTemplates' => [
- 'close' => '',
- 'footer' => '<div class="file-thumbnail-footer">'
- . '<div class="file-footer-caption" title="{caption}">{caption}<br>{size}</div>'
- . '{actions}'
- . '</div>',
- ],
- 'maxFileCount' => 10,
- ],
- ]);?>
- <p class="format-icons">
- <i class="fa fa-lg fa-file-word-o text-primary"></i>
- <i class="fa fa-lg fa-file-pdf-o text-primary"></i>
- <i class="fa fa-lg fa-file-powerpoint-o text-primary"></i>
- <i class="fa fa-lg fa-file-excel-o text-primary"></i>
- <i class="fa fa-lg fa-file-text-o text-primary"></i>
- </p>
- <div id="loading" style="display:none"></div>
- <div class="word-count-block" style="">
- <p style="display:inline-flex">
- <span>word count:</span>
- <input class="form-control" required type="number" min="1" id="wcount" value="0"/>
- </p>
- </div>
- <input type="hidden" value="0" class="word-count-all-block"/>
- </div>
- </div>
- </li>
- <li class="animated fadeInRight animation-delay-2">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">5</span></time>
- <div class="form-group">
- <label for="select">Priorities...</label>
- <select class="form-control cookieset">
- <?php foreach ($presets as $key => $value) :?>
- <option value="<?=$key?>"><?=$value;?></option>
- <?php endforeach; ?>
- </select>
- </div>
- <div class="form-group">
- <label for="free-brief">Add a free text brief for your Account Manager</label>
- <textarea maxlength="10000" placeholder="Your text..." rows="4" class="form-control cookieset" id="free-brief"></textarea>
- </div>
- </div>
- </div>
- </li>
- <li class="animated fadeInRight animation-delay-2">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">6</span></time>
- <div class="col-lg-6 col-sm-12">
- <i class="fa fa-credit-card fa-2x"></i>
- <label>PRICE</label>
- <p class="price"><?=Html::encode(Yii::$app->settings->get('site', 'currency')) . Html::encode(Yii::$app->settings->get('site', 'price'))?>/word</p>
- <input type="hidden" value="<?=Html::encode(Yii::$app->settings->get('site', 'price'))?>" class="price-settings">
- <input type="hidden" value="" class="price-lang">
- </div>
- <div class="col-lg-6 col-sm-12">
- <i class="fa fa-clock-o fa-2x"></i>
- <label>DELIVERY TIME</label>
- <p class="speed">Minimum 16 hr</p>
- <input type="hidden" value="<?=Html::encode(Yii::$app->settings->get('site', 'speed'))?>" class="speed-settings">
- <input type="hidden" value="<?=Html::encode(Yii::$app->settings->get('site', 'minimum_words'))?>" class="word-settings">
- <input type="hidden" value="57600" class="speed-seconds">
- <input type="hidden" value="" class="speed-lang">
- <input type="hidden" value="" class="speed-type">
- <input type="hidden" value="1" class="hour_index">
- </div>
- </div>
- </div>
- </li>
- <li class="animated fadeInRight animation-delay-2">
- <time class="timeline-time" datetime=""><span class="timeline-point-w" style="font-size: 40px;">7</span></time>
- <a data-trigger="manual" id="translate-now" style="background-image: none" tabindex="0" class="btn btn-ar btn-transparent-opaque btn-xl translate-btn" role="button" data-html="true" data-placement="top" data-toggle="popover" title="" data-content='<ul class="submit-popover-list"><li class="lng">Source and Target Languages</li><li class="inactive expertise">Expertise</li><li class="inactive files">Files / Word Count</li></ul>' data-original-title="Please complete the following in order to start translation:" disabled="disabled">Translate Now</a>
- <p id="error-submit-block" class="text-danger"></p>
- </div>
- </div>
- </li>
- </ul>
- </form>
- <div class="col-md-3">
- <div class="floating_content">
- <div class="content-box animated fadeInDown animation-delay-14" style="color: #666; background-color: white;border-radius:5px;margin-top: -20px;">
- <div class="guarantee"></div>
- <h4 class="content-box-title" style="color:#666;">Order summary</h4>
- <div class="panel-body">
- <div class="col-lg-6 col-sm-12">
- <i class="fa fa-credit-card fa-2x"></i>
- <label>PRICE</label>
- <p class="price"><?=Html::encode(Yii::$app->settings->get('site', 'currency')) . Html::encode(Yii::$app->settings->get('site', 'price'))?>/word</p>
- </div>
- <div class="col-lg-6 col-sm-12">
- <i class="fa fa-clock-o fa-2x"></i><br/>
- <label>DELIVERY TIME</label>
- <p class="speed">Minimum 16 hr</p>
- </div>
- </div>
- </div>
- <br>
- <div class="text-center animated fadeInDown animation-delay-16" style="">
- <a class="btn btn-success quality_btn" href="<?=Url::to(['site/quality'])?>" style="background-color: #3ab94e;border-color: #3ab94e;">Quality Standard</a>
- </div>
- <br/>
- <div class="panel-group animated fadeInDown animation-delay-10" id="accordion">
- <!--<div class="panel panel-default">-->
- <div class="panel-default">
- <div class="panel-heading panel-heading-link">
- <!--<div class=" ">-->
- <div class="text-center animated fadeInDown animation-delay-16" style="">
- <a class="btn btn-success quality_btn" data-toggle="collapse" data-parent="#accordion" href="#collapseZero" style="border-color: rgb(58, 185, 78); background-color: rgb(58, 185, 78) !important; color: white; font-family: Roboto;">How to Use <i class="fa fa-arrow-down fa-4x" aria-hidden="true"></i>
- </a>
- </div>
- </div>
- <div id="collapseZero" class="panel-collapse collapse">
- <div class="panel-body">
- <div class="panel panel-default">
- <div class="panel-heading panel-heading-link">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
- <i class="fa fa-lightbulb-o"></i> Step 1
- </a>
- </div>
- <div id="collapseOne" class="panel-collapse collapse">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?= $this->render('_wordcountmodal', []) ?>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- console.log($.cookie("sourceLangSelect"));
- $(this).scroll(function(){
- if($( window ).width()>922){
- $(".floating_content").css("position","relative");
- // console.log($(this).scrollTop());
- if($(this).scrollTop()< 1900)
- {
- $(".floating_content").css("bottom",(-1*($(this).scrollTop())));
- }
- }
- });
- $("#wcount").change(function(){
- $("li.active").find("a").click();
- });
- $(".cookieset").change(function(){
- var source = $('#sourceLangSelect').next().find('.items div').attr('data-value');
- var target = [];
- $('#targetLangSelect').next().find('.items div').each(function() { target.push($(this).attr('data-value')); });
- if(source && target.length > 0) {error = false;}
- var presets = $('.brief-block select').val();
- var speed = $('.project-block .speed-seconds').val();
- var price = $('.project-block .price').text();
- $.cookie("sourceLangSelect", source , {path: "/"});
- $.cookie("targetLangSelect", target , {path: "/"});
- $.cookie("presets", target , {path: "/"});
- $.cookie("speed", speed , {path: "/"});
- $.cookie("price", price , {path: "/"});
- });
- $(".cookieset").click(function(){
- var type = $('.animation-delay-10 ul.ar-nav-pills li.active a').text();
- var expert = $('.expert-block li.active span').attr('id');
- $.cookie("type", type , {path: "/"});
- $.cookie("expert", expert , {path: "/"});
- });
- $(".cookieset").keyup(function(){
- var free = $('.brief-block #free-brief').val();
- $.cookie("free", free , {path: "/"});
- });
- });
- </script>
Add Comment
Please, Sign In to add comment