<?php
namespace platyFramework;

/**
 * View 파일 입니다
 *
 * @var ptyFormModel $form
 * @var ptyTableItemModel $item
 */
?>
<section class="content-header">
    <h1>
        <?= $title ?>
        <small><?= $title_desc ?></small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="<?= $this->request->appUrl ?>"><i class="fa fa-dashboard"></i> Home</a>
        </li>
    </ol>
</section>

<form class="form-horizontal" method="post" action="<?= $postUrl ?>" enctype="multipart/form-data">
    <section class="content">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">기본 정보</h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                    </button>
                </div>
            </div>
            <div class="box-body pad">
                <input type="hidden" name="id" value="<?= $item->id ?>">
                <? if ($this->signedInItem->isSuperAdmin()) { ?>
                    <?= $form->getInput("@안드로이드 패키지명 설정", "androidPackageName", "placeholder='com.xxx.xxx'"); ?>
                    <?= $form->getInput("@redirectAndroidApp", "redirectAndroidApp", "placeholder='com.xxx.xxx'"); ?>
                    <?= $form->getInput("@redirectUrl", "redirectUrl", "placeholder='http://www.~~~'"); ?>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">앱 설치 URL</label>
                        <?
                        $url1 = "http://" . $_SERVER['HTTP_HOST'];
                        $url2 = "https://play.google.com/store/apps/details?id=" . $this->config->mobileapp->packageName;
                        ?>
                        <div class="col-sm-10">
                            <input readonly type="text" id="packageName" name="" value="<?= $url1 ?>"
                                   class="form-control" xstyle="width: 90%; display: inline-block">
                            <? if (FALSE) { ?>
                                <input readonly type="text" id="packageName" name="" value="<?= $url2 ?>"
                                       class="form-control" xstyle="width: 90%; display: inline-block">
                            <? } ?>
                        </div>
                    </div>
                <? } ?>
                <?= $form->getFile2("Intro 화면 설정", "introImage"); ?>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-10">
                        <div class="alert alert-info alert-dismissible">
                            <h4><i class="icon fa fa-info"></i>안내</h4>
                            * <b>Intro 화면 설정</b>은 모바일에서 빠른 로딩을 위해 <b>jpg</b> 형식의 이미지를 꼭 설정하세요.
                        </div>
                        <b><font color="blue"></font></b><br>
                    </div>
                </div>
                <?= $form->getInput("설정 > 문의&제안 설정", "askUrl"); ?>
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="col-sm-2 control-label"></label>
                        <div class="col-sm-10">
                            <b>아래처럼 파란 부분을 입력해 주세요</b><br>
                            <div class="row">
                                <div class="col-sm-2">전화 걸게 하기</div>
                                <div class="col-sm-10"><font color="blue">tel://010-1234-1234</font>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2">URL로 이동 시키기</div>
                                <div class="col-sm-10"><font color="blue">http://www.daum.net</font>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-2">이메일을 보내게 하기</div>
                                <div class="col-sm-10"><font color="blue">mailto:email@email.com</font>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

                <?= $form->getInput("앱 테마 설정", "themeName", "", ""); ?>
                <?= $form->getInput("앱 기본 색상 설정", "backgroundColor", "", "화면의 {appBackgroundColor} 를 대체합니다"); ?>

                <? $o = ""; $this->callAction("onAdminTableItemsEditBottom", $this, $o); echo $o; ?>
            </div>
            <div class="box-footer">
                <button type="button" class="btn btn-default ptyGoBack pull-right">취소</button>
                <button type="submit" class="btn btn-info pull-left">저장</button>
            </div>
        </div>
    </section>
</form>
<script src="<?= $this->request->moduleUrl ?>/ptyadmin/resources/AdminLTE-2.4.5/bower_components/ckeditor/ckeditor.js"></script>