<?php
include INDEX_ROOT.'admin/head.php';
admin_head('应用编辑');
?>
<!-- content start -->
<div class="admin-content">

    <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">应用编辑</strong></div>
    </div>
    <form class="am-form" method="post" action="/admin/appsubmit.cgi?m=edit&id=<?=$_GET['client_id']?>">
        <div class="am-tabs am-margin" data-am-tabs>
            <ul class="am-tabs-nav am-nav am-nav-tabs">
                <li class="am-active"><a href="#tab1">应用信息</a></li>
            </ul>
<?php
$apps=new \auth\oauthapps();
?>
            <div class="am-tabs-bd">
                <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                    <?php
                    $form=new amaze\form();
                    $form->text('应用ID','client_id','disabled value='.$_GET['client_id']);
                    $form->text('应用名称','name','required value='.$apps->info($_GET['client_id'])['name']);
                    $form->text('应用主页','home','required value='.$apps->info($_GET['client_id'])['home']);
                    $form->text('授权回调域名','domain','required value='.$apps->info($_GET['client_id'])['redirect_uri']);
                    $form->text('应用介绍','present','required value='.$apps->info($_GET['client_id'])['present']);
                    ?>
                </div>
            </div>
        </div>

        <div class="am-margin">
            <input type="submit" class="am-btn am-btn-primary am-btn-xs">
        </div>
    </form>
</div>
<!-- content end -->

<?php
admin_foot();
?>
