<style>
    p {
        font-size: 15px;
        margin: 20px 0;
    }
</style>
<h2>我的设置</h2>
<p>
<label for="time">入职时间：</label>
<input type="date" id="time" value="{{ time }}">
</p>
<p>
<label for="introduction" style="vertical-align: top;">诚信宣言：</label>
<textarea id="introduction" placeholder="请输入诚信宣言" rows="10" cols="50" style="resize: none;">{{ introduction }}</textarea>
</p>
<p>
    <input type="hidden" id="user_id" value="{{ user_id }}">
    <input type="submit" id="submit" class="button">
</p>
<script>
    (function ($) {
        $(document).ready(function () {
            $('#submit').click(function () {
                var introduction = $('#introduction').val();
                var time = $('#time').val();
                var user_id = $('#user_id').val();
                $.ajax({
                    type: 'POST',
                    url: '{{ url }}/wp-admin/admin-ajax.php/',
                    data: 'action=submit_introduction&time=' + time + '&introduction=' + introduction + '&user_id=' + user_id,
                    success: function (data) {
                        if (data) {
                            alert('提交成功');
                        }
                    }
                });
            });
        });
    })(jQuery);
</script>