Exemple #1
0
def member_join_form(nodes=[]):
    return pyforms.Form(pyforms.Dropdown("node_id",
                                         description=u"区域",
                                         args=nodes,
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("realname",
                                        rules.len_of(2, 32),
                                        description=u"用户姓名(必填)",
                                        required="required",
                                        **input_style),
                        pyforms.Dropdown("sex",
                                         description=u"性别",
                                         args=sexopt.items(),
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("age",
                                        rules.is_number,
                                        description=u"年龄(必填)",
                                        size=3,
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("username",
                                        rules.is_alphanum3(6, 32),
                                        description=u"用户名(必填)",
                                        size=32,
                                        required="required",
                                        **input_style),
                        pyforms.Password("password",
                                         rules.len_of(6, 32),
                                         description=u"登录密码(必填)",
                                         size=32,
                                         required="required",
                                         **input_style),
                        pyforms.Textbox("email",
                                        rules.is_email,
                                        description=u"电子邮箱(必填)",
                                        size=64,
                                        required="required",
                                        **input_style),
                        pyforms.Textbox("idcard",
                                        rules.len_of(0, 32),
                                        description=u"证件号码",
                                        **input_style),
                        pyforms.Textbox("mobile",
                                        rules.len_of(0, 32),
                                        description=u"用户手机号码",
                                        **input_style),
                        pyforms.Textbox("address",
                                        description=u"用户地址",
                                        hr=True,
                                        **input_style),
                        pyforms.Button("submit",
                                       type="submit",
                                       html=u"<b>注册</b>",
                                       **button_style),
                        action="/join",
                        title=u"用户注册")
Exemple #2
0
def member_join_form(nodes=[]): 
    return pyforms.Form(
        pyforms.Dropdown("node_id", description=u"区域", args=nodes,required="required", **input_style),
        pyforms.Textbox("realname", rules.len_of(2,32), description=u"用户姓名(必填)", required="required",**input_style),
        pyforms.Dropdown("sex", description=u"性别", args=sexopt.items(),required="required", **input_style),
        pyforms.Textbox("age", rules.is_number, description=u"年龄(必填)", size=3,required="required",**input_style),
        pyforms.Textbox("username", rules.is_alphanum3(6, 32), description=u"用户名(必填)", size=32,required="required",**input_style),
        pyforms.Password("password", rules.len_of(6,32), description=u"登录密码(必填)", size=32, required="required",**input_style),
        pyforms.Textbox("email", rules.is_email, description=u"电子邮箱(必填)", size=64,required="required",**input_style),
        pyforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        pyforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        pyforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        pyforms.Button("submit", type="submit", html=u"<b>注册</b>", **button_style),
        action="/join",
        title=u"用户注册"
    )
Exemple #3
0
                                       html=u"<b>注册</b>",
                                       **button_style),
                        action="/join",
                        title=u"用户注册")


password_update_form = pyforms.Form(pyforms.Textbox("account_number",
                                                    description=u"用户账号",
                                                    readonly="readonly",
                                                    **input_style),
                                    pyforms.Password("old_password",
                                                     description=u"旧密码(必填)",
                                                     required="required",
                                                     **input_style),
                                    pyforms.Password("new_password",
                                                     rules.is_alphanum3(6, 32),
                                                     description=u"新密码(必填)",
                                                     required="required",
                                                     **input_style),
                                    pyforms.Password("new_password2",
                                                     rules.is_alphanum3(6, 32),
                                                     description=u"确认新密码(必填)",
                                                     required="required",
                                                     **input_style),
                                    pyforms.Button("submit",
                                                   type="submit",
                                                   html=u"<b>提交</b>",
                                                   **button_style),
                                    title=u"修改密码",
                                    action="/password/update")
Exemple #4
0
        pyforms.Textbox("age", rules.is_number, description=u"年龄(必填)", size=3,required="required",**input_style),
        pyforms.Textbox("username", rules.is_alphanum3(6, 32), description=u"用户名(必填)", size=32,required="required",**input_style),
        pyforms.Password("password", rules.len_of(6,32), description=u"登录密码(必填)", size=32, required="required",**input_style),
        pyforms.Textbox("email", rules.is_email, description=u"电子邮箱(必填)", size=64,required="required",**input_style),
        pyforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        pyforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        pyforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        pyforms.Button("submit", type="submit", html=u"<b>注册</b>", **button_style),
        action="/join",
        title=u"用户注册"
    )
    
password_update_form =  pyforms.Form(
        pyforms.Textbox("account_number", description=u"用户账号",  readonly="readonly", **input_style),
        pyforms.Password("old_password",description=u"旧密码(必填)", required="required",**input_style),
        pyforms.Password("new_password", rules.is_alphanum3(6, 32),description=u"新密码(必填)", required="required",**input_style),
        pyforms.Password("new_password2",rules.is_alphanum3(6, 32), description=u"确认新密码(必填)", required="required",**input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"修改密码",
        action="/password/update"
    )

password_mail_form =  pyforms.Form(
        pyforms.Textbox("member_name", rules.len_of(1, 64),description=u"请输入登录名", required="required",**input_style),
        pyforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"重置密码请求",
        action="/password/mail"
    )
    
password_reset_form =  pyforms.Form(
        pyforms.Hidden("active_code", description=u"", **input_style),