website.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2017-03-15 21:16
  7. */
  8. /**
  9. * @var $this yii\web\View
  10. * @var $model common\models\Options
  11. * @var $timezones array
  12. * @var $frontendSupportLanguages array
  13. */
  14. use backend\widgets\ActiveForm;
  15. use common\libs\Constants;
  16. $this->title = Yii::t('app', 'Website Setting');
  17. $this->params['breadcrumbs'][] = Yii::t('app', 'Website Setting');
  18. ?>
  19. <div class="row">
  20. <div class="col-sm-12">
  21. <div class="ibox float-e-margins">
  22. <?=$this->render('/widgets/_ibox-title')?>
  23. <div class="ibox-content">
  24. <?php $form = ActiveForm::begin(); ?>
  25. <?php
  26. $template = "{label}\n<div class='col-sm-8'>{input}\n{error}</div>\n{hint}<div class='col-sm-2'><span class='tips'> {{%TIPS%}}</span></div>";
  27. ?>
  28. <?= $form->field($model, 'website_title', ['template' => str_replace("{{%TIPS%}}", "", $template)]) ?>
  29. <div class="hr-line-dashed"></div>
  30. <?= $form->field($model, 'website_url', ['template' => str_replace("{{%TIPS%}}", "<i class='fa fa-info-circle'></i> " . yii::t('app', 'Only filled in can show picture (Recommend start with // adapt to http or https)'), $template)]) ?>
  31. <div class="hr-line-dashed"></div>
  32. <?= $form->field($model, 'seo_keywords', ['template' => str_replace("{{%TIPS%}}", "", $template)]) ?>
  33. <div class="hr-line-dashed"></div>
  34. <?= $form->field($model, 'seo_description', ['template' => str_replace("{{%TIPS%}}", "", $template)])->textarea() ?>
  35. <div class="hr-line-dashed"></div>
  36. <?= $form->field($model, 'website_language', ['template' => str_replace("{{%TIPS%}}", "<i class='fa fa-info-circle'></i> " . yii::t('app', 'Frontend default language'), $template)])->dropDownList($frontendSupportLanguages) ?>
  37. <div class="hr-line-dashed"></div>
  38. <?= $form->field($model, 'website_comment', ['template' => str_replace("{{%TIPS%}}", "", $template)])->radioList(Constants::getYesNoItems()) ?>
  39. <div class="hr-line-dashed"></div>
  40. <?= $form->field($model, 'website_comment_need_verify', ['template' => str_replace("{{%TIPS%}}", "", $template)])->radioList(Constants::getYesNoItems()) ?>
  41. <div class="hr-line-dashed"></div>
  42. <?= $form->field($model, 'website_email', ['template' => str_replace("{{%TIPS%}}", "", $template)]) ?>
  43. <div class="hr-line-dashed"></div>
  44. <?= $form->field($model, 'website_timezone', ['template' => str_replace("{{%TIPS%}}", "<i class='fa fa-info-circle'></i> " . yii::t('app', 'Frontend timezone'), $template)])->chosenSelect($timezones) ?>
  45. <div class="hr-line-dashed"></div>
  46. <?= $form->field($model, 'website_icp', ['template' => str_replace("{{%TIPS%}}", "", $template)]) ?>
  47. <div class="hr-line-dashed"></div>
  48. <?= $form->field($model, 'website_statics_script', ['template' => str_replace("{{%TIPS%}}", "", $template)])->textarea() ?>
  49. <div class="hr-line-dashed"></div>
  50. <?= $form->field($model, 'website_status', ['template' => str_replace("{{%TIPS%}}", "", $template)])->radioList(Constants::getWebsiteStatusItems()) ?>
  51. <div class="hr-line-dashed"></div>
  52. <?= $form->defaultButtons() ?>
  53. <?php ActiveForm::end(); ?>
  54. </div>
  55. </div>
  56. </div>
  57. </div>