

<?php $__env->startSection("content"); ?>
<div class="sixteen wide column">
    <h1 class="ui header">
        <a href="javascript:window.history.back();"><i class="arrow left icon"></i></a> 
        新增帳號
    </h1>
    <div class="ui divider"></div>
    <form method="POST" class="ui form" action="<?php echo e(url('/user')); ?>">
        <?php echo e(csrf_field()); ?>

        <?php echo e(method_field("POST")); ?>

        <div class="fields">
            <div class="field">
                <label for="name">姓名</label>
                <input type="text" name="name" id="name">
            </div>
            <div class="field">
                <label for="email">帳號</label>
                <input type="email" name="email" id="email">
            </div>
        </div>
        <div class="fields">
            <div class="field">
                <label for="password">密碼</label>
                <input type="password" name="password" id="password">
            </div>
            <div class="field">
                <label for="password_confirmation">確認密碼</label>
                <input type="password" name="password_confirmation" id="password_confirmation">
            </div>
        </div>
        <div class="fields">
            <div class="field">
                <label for="group_id">角色</label>
                <select name="group_id" id="group_id" class="ui selection dropdown">
                    <option value="">請選擇角色</option>
                    <?php foreach($opts as $k => $v): ?>
                    <option value="<?php echo e($k); ?>"><?php echo e($v); ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <?php if(count($errors) > 0): ?>
            <?php echo $__env->make('partials.error', ['errors'=>$errors], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <?php endif; ?>
        <div class="ui divider"></div>
        <div class="field center aligned">
            <?php if($editable): ?>
            <button type="submit" class="ui green icon button">
                <i class="check icon"></i> 儲存帳號
            </button>
            <?php endif; ?>
            <a href="javascript:window.history.back();" class="ui icon button">
                <i class="arrow left icon"></i> 取消，回上頁
            </a> 
        </div>
    </form>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('sales.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>