@if ($errors->any())
<!-- Modal -->
<div class="modal fade" id="dialog-common" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">{{ inject('setting')->langs('system', 'prompt') }}</h4>
            </div>
            <div class="modal-body clearfix modal-error">
                <div class='col-sm-1 text-center'><i class='fa fa-exclamation-circle'></i></div>
                <div class='col-sm-11 breakall'><p class="common">{!! $errors->first() !!}</p></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn-modal-common" data-dismiss="modal">{{ inject('setting')->langs('system', 'ok') }}</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal End -->
<script>
    $(function(){
        $('#dialog-common').modal('show');
    });
</script>
@endif
@if (Session::has('error'))
<!-- Modal -->
<div class="modal fade" id="dialog-common" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">{{ inject('setting')->langs('system', 'prompt') }}</h4>
            </div>
            <div class="modal-body clearfix">
                <div class='col-sm-1 text-center'><i class='fa fa-exclamation-circle'></i></div>
                <div class='col-sm-11 breakall'><p class="common">{!! Session::get('error') !!}</p></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn-modal-common" data-dismiss="modal">{{ inject('setting')->langs('system', 'ok') }}</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal End -->
<script>
    $(function(){
        $('#dialog-common').modal('show');
    });
</script>
@endif
@if (Session::has('success'))
<!-- Modal -->
<div class="modal fade" id="dialog-common" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">{{ inject('setting')->langs('system', 'prompt') }}</h4>
            </div>
            <div class="modal-body clearfix">
                <div class='col-sm-1 text-center'><i class='fa fa-check-circle'></i></div>
                <div class='col-sm-11 breakall'><p class="common">{!! Session::get('success') !!}</p></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn-modal-common" data-dismiss="modal">{{ inject('setting')->langs('system', 'ok') }}</button>
            </div>
        </div>
    </div>
</div>
<!-- Modal End -->
<script>
    $(function(){
        $('#dialog-common').modal('show');
    });
</script>
@endif