示例#1
0
def profile_editor(context, request):
    """
        Profile editor doesn't have forms. All forms are handle by ajax urls.
    """

    view_context = {}

    tabs = get_available_tabs(context)

    profile_filled = calculate_filled_profile(context.user, tabs)

    pending_actions = get_pending_actions(context.user, tabs)

    max_loa = get_max_available_loa(context.get_groups())
    max_loa = context.loa_to_int(loa=max_loa)

    (open_wizard, datakey) = nins_open_wizard(context, request)

    view_context = {
        "tabs": tabs,
        "userid": context.user.get(context.main_attribute),
        "user": context.user.get_doc(),
        "profile_filled": profile_filled,
        "pending_actions": pending_actions,
        "workmode": context.workmode,
        "max_loa": max_loa,
        "polling_timeout_for_admin": request.registry.settings.get("polling_timeout_for_admin", 2000),
        "open_wizard": open_wizard,
        "datakey": datakey,
    }

    return view_context
示例#2
0
def userstatus(context, request):
    user = context.user
    tabs = get_available_tabs(context)
    profile_filled = calculate_filled_profile(context.user, tabs)
    return {
        'loa': request.session.get('loa', 1),
        'max_loa': get_max_available_loa(context.get_groups()),
        'profile_filled': '%s%%' % profile_filled,
        'pending_actions': get_pending_actions(user, tabs),
    }
示例#3
0
def profile_editor(context, request):
    """
        Profile editor doesn't have forms. All forms are handle by ajax urls.
    """

    context.user.retrieve_modified_ts(request.db.profiles)

    view_context = {}

    tabs = get_available_tabs(context, request)

    profile_filled = calculate_filled_profile(tabs)

    pending_actions = get_pending_actions(context.user, tabs)

    max_loa = get_max_available_loa(context.get_groups())
    max_loa = context.loa_to_int(loa=max_loa)

    (open_wizard, datakey) = nins_open_wizard(context, request)

    view_context = {
        'tabs': tabs,
        'userid': context.user.get(context.main_attribute),
        'user': context.user.get_doc(),
        'profile_filled': profile_filled,
        'pending_actions': pending_actions,
        'workmode': context.workmode,
        'max_loa': max_loa,
        'polling_timeout_for_admin': request.registry.settings.get(
            'polling_timeout_for_admin', 2000),
        'open_wizard': open_wizard,
        'datakey': datakey,
        'has_mobile': has_confirmed_mobile(context.user),
        'nins_wizard_chooser_url': context.safe_route_url('nins-wizard-chooser'),
        'nins_verification_chooser_url': context.safe_route_url('nins-verification-chooser'),
    }

    return view_context