{template "header.html"}

<div class="note note-danger">
    <p><a href="javascript:dr_update_cache('verify', '');">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>

<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    {$form}
    <div class="portlet bordered light myfbody">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green-sharp">
                    {dr_lang('审核流程')}
                </span>
            </div>
            <div class="actions">
                <div class="btn-group">
                    <a class="btn" href="{$reply_url}"> <i class="fa fa-mail-reply"></i> {dr_lang('返回')}</a>
                </div>
            </div>
        </div>
        <div class="portlet-body">
            <div class="form-body">


                <div class="form-group" id='dr_row_name'>
                    <label class="col-md-2 control-label">{dr_lang('名称')}</label>
                    <div class="col-md-7">
                        <label>
                            <input type="text" name="data[name]" value="{htmlspecialchars($name)}" class="form-control">
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">{dr_lang('修改数据时')}</label>
                    <div class="col-md-9">
                        <div class="mt-radio-inline">
                            <label class="mt-radio">
                                <input {if !$value.edit}checked{/if} name="value[edit]" type="radio" value="0"> {dr_lang('不审核')}
                                <span></span>
                            </label>
                            <label class="mt-radio">
                                <input {if $value.edit}checked{/if} name="value[edit]" type="radio" value="1"> {dr_lang('审核')}
                                <span></span>
                            </label>
                        </div>
                        <span class="help-block"> {dr_lang('修改数据时是否重新走审核流程，选择不审核就直接通过')} </span>
                    </div>
                </div>

                {php for($i = 1; $i < 9; $i++) { }

                <div class="form-group">
                    <label class="col-md-2 control-label"> {dr_lang('第%s次审核', $i)} </label>
                    <div class="col-md-7">
                        <label>
                        <select name="value[role][{$i}]" class="form-control">
                            <option value=""> {dr_lang('不审核')} </option>
                            {loop $ci->role $t}
                            {if $t.id != 1 && !$t.application.tid}
                            <option value="{$t.id}" {if $t.id == $value[role][$i]} selected{/if}> {dr_lang($t.name)} </option>
                            {/if}
                            {/loop}
                        </select>
                            </label>
                    </div>
                </div>

                {php } }


            </div>
        </div>
    </div>

    <div class="portlet-body form myfooter">
        <div class="form-actions text-center">
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存内容')}</button>
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{$post_url}')" class="btn blue"> <i class="fa fa-plus"></i> {dr_lang('保存再添加')}</button>
            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000', '{$reply_url}')" class="btn yellow"> <i class="fa fa-mail-reply-all"></i> {dr_lang('保存并返回')}</button>
        </div>
    </div>
</form>

{template "footer.html"}