def authinfo_add_mini(request):
    status = 0
    authinfo_id = 0
    if request.method == 'POST':
        form =AuthInfoForm(request.POST)
        if form.is_valid():
            form.save()
            auth_name = request.POST.get('dis_name', '')
            auth_info = AuthInfo.objects.get(dis_name=auth_name)
            authinfo_id = auth_info.id
            status = 1
        else:
            status = 2
    else:
        form = AuthInfoForm()

    results = {
        'form': form,
        'request': request,
        'status': status,
        'auth_id': authinfo_id,
        'auth_name': request.POST.get('dis_name', ''),
        'page_type': "mini"
    }
    return render(request, 'appconf/authinfo_add_edit_mini.html', results)