app/soc/views/models/club_admin.py
changeset 1116 5a9d4c2d6748
parent 1076 063194eaf87b
child 1163 d8c50be19232
equal deleted inserted replaced
1115:0a723ff3d27c 1116:5a9d4c2d6748
    23   ]
    23   ]
    24 
    24 
    25 
    25 
    26 from django import forms
    26 from django import forms
    27 
    27 
    28 from soc.logic import cleaning
       
    29 from soc.logic import dicts
    28 from soc.logic import dicts
    30 from soc.logic.models import club as club_logic
    29 from soc.logic.models import club as club_logic
    31 from soc.views.helper import access
    30 from soc.views.helper import access
    32 from soc.views.helper import dynaform
    31 from soc.views.helper import dynaform
    33 from soc.views.helper import widgets
    32 from soc.views.helper import widgets
    71 
    70 
    72     new_params['name'] = "Club Admin"
    71     new_params['name'] = "Club Admin"
    73     new_params['sidebar_grouping'] = 'Clubs'
    72     new_params['sidebar_grouping'] = 'Clubs'
    74 
    73 
    75     new_params['extra_dynaexclude'] = ['agreed_to_tos']
    74     new_params['extra_dynaexclude'] = ['agreed_to_tos']
    76 
       
    77     new_params['create_extra_dynafields'] = {
       
    78        'scope_path': forms.CharField(widget=forms.HiddenInput,
       
    79                                   required=True),
       
    80        'clean_link_id' : cleaning.clean_existing_user('link_id'),
       
    81        'clean_home_page' : cleaning.clean_url('home_page'),
       
    82        'clean_blog' : cleaning.clean_url('blog'),
       
    83        'clean_photo_url' : cleaning.clean_url('photo_url')}
       
    84 
    75 
    85     new_params['allow_invites'] = True
    76     new_params['allow_invites'] = True
    86 
    77 
    87     params = dicts.merge(params, new_params)
    78     params = dicts.merge(params, new_params)
    88 
    79