<div class="content_wrapper">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>任务编辑</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-horizontal" role="form" method="post" action="task/actionEdit">
                                        <input type="hidden" name="tid" value="<?php echo $tid;?>">
                                        <div class="modal-body">
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">当前图片:</label>
                                                <div class="col-sm-3">
                                                    <img class="giftimg" src="<?php echo $baseUrl.'/mission/'.$info['image'];?>" />
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">中文名称:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="中文名称" name="tc_zh_name" value="<?php echo $info['zh_name'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">泰文:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="泰文" name="tc_name" value="<?php echo $info['name'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">排序(数字大的排在前):</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="排序" name="tc_sort" value="<?php echo $info['sort'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">记录任务关键字(开发用):</label>
                                                <div class="col-sm-3">
                                                    <input readonly="readonly" type="text" class="form-control" placeholder="排序" name="tc_contype" value="<?php echo $info['contype'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">跳转页面:</label>
                                                <div class="col-sm-3">
                                                    <input type="text" class="form-control" placeholder="跳转页面" name="tc_goto" value="<?php echo $info['goto'];?>">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-3 control-label">任务奖励内容:</label>
                                                <div class="col-md-6">
                                                    <?php
                                                        $task = json_decode($info['subtask'], 1);
                                                        foreach ($task as $key => $val) {
                                                    ?>
                                                    <label>牌局数:</label>
                                                    <input type="text" class="form-control" placeholder="牌局数" name="rewardNum[]" value="<?php echo $val['num'];?>">
                                                    <label>奖励筹码:</label>
                                                    <?php foreach ($val['reward'] as $type => $num) {?>
                                                        <input type="text" class="form-control" placeholder="奖励筹码" name="rewardMoney[]" value="<?php echo $num;?>">
                                                    <?php } ?>
                                                    <?php } ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-3">
                                                <button type="button" class="btn btn-info goback">返回</button>
                                                <button type="button" class="btn btn-primary J_ajaxSubmitBtn">提交</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">
    $('.goback').click(function(){
       history.go(-1);
    });
</script>