def customer_update_form(nodes=[]): return btforms.Form( btforms.Hidden("account_number", description=u"用户账号"), btforms.Hidden("customer_id", description=u"mid", required="required", **input_style), btforms.Textbox("realname", rules.len_of(2, 32), description=u"用户姓名", required="required", **input_style), btforms.Textbox("customer_name", description=u"自助服务用户名", readonly="readonly", autocomplete="off", **input_style), btforms.Password("new_password", rules.len_of(0, 128), value="", description=u"自助服务密码(留空不修改)", **input_style), btforms.Textbox("email", rules.len_of(0, 128), description=u"电子邮箱", **input_style), btforms.Textbox("idcard", rules.len_of(0, 32), description=u"证件号码", **input_style), btforms.Textbox("mobile", rules.len_of(0, 32), description=u"用户手机号码", **input_style), btforms.Textbox("address", description=u"用户地址", hr=True, **input_style), btforms.Textarea("customer_desc", description=u"用户描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户基本信息修改", action="/admin/customer/update" )
def account_open_form(products=[]): return btforms.Form( btforms.Hidden("node_id", description=u"区域", **input_style), btforms.Hidden("customer_id", description=u"编号"), btforms.Textbox("realname", description=u"用户姓名", readonly="readonly", **input_style), btforms.Textbox("account_number", description=u"用户账号", required="required", **input_style), btforms.Textbox("password", description=u"认证密码", required="required", **input_style), btforms.Button("button", type="button", onclick="reBuildAccount();", html=u"<b>重新生成账号密码</b>", **_btn_style), btforms.Textbox("ip_address", description=u"用户IP地址", **input_style), btforms.Textbox("address", description=u"用户装机地址", required="required", **input_style), btforms.Dropdown("product_id", args=products, description=u"资费", required="required", **input_style), btforms.Textbox("months", rules.is_number, description=u"月数(包月有效)", required="required", **input_style), btforms.Textbox("giftdays", rules.is_number, description=u"赠送天数", value=0, required="required", **input_style), btforms.Textbox("fee_value", rules.is_rmb, description=u"缴费金额", required="required", **input_style), btforms.Textbox("expire_date", rules.is_date, description=u"过期日期", readonly="readonly", **input_style), btforms.Hidden("status", value=1, description=u"用户状态", **input_style), btforms.Textarea("account_desc", description=u"用户描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户新开账号", action="/admin/account/open" )
def operator_update_form(nodes=[], products=[]): return btforms.Form( btforms.Hidden("id", description=u"编号"), btforms.Textbox("operator_name", description=u"操作员名称", readonly="readonly", **input_style), btforms.Textbox("operator_desc", rules.len_of(0, 255), description=u"操作员姓名", **input_style), btforms.Password("operator_pass", rules.len_of(0, 128), description=u"操作员密码(留空不修改)", autocomplete="off",**input_style), btforms.Dropdown("operator_status", description=u"操作员状态", args=opr_status_dict.items(), required="required",**input_style), btforms.Dropdown("operator_nodes", description=u"关联区域(多选)", args=nodes, required="required",multiple="multiple", size=4, **input_style), btforms.Dropdown("operator_products", description=u"关联资费(多选)", args=products, required="required",multiple="multiple", size=6, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"修改操作员", action="/admin/operator/update" )
def account_update_form(): return btforms.Form( btforms.Textbox("account_number", description=u"用户账号", readonly="readonly", **input_style), btforms.Textbox("ip_address", description=u"用户IP地址", **input_style), btforms.Hidden("install_address", description=u"用户安装地址", required="required", **input_style), btforms.Textbox("new_password", description=u"认证密码(留空不修改)", **input_style), btforms.Textbox("user_concur_number", rules.is_number, description=u"用户并发数", required="required", **input_style), btforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC", **input_style), btforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN", **input_style), btforms.Textarea("account_desc", description=u"用户描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户策略修改", action="/admin/account/update" )
def account_change_form(products=[]): return btforms.Form( btforms.Hidden("account_number", description=u"用户账号", required="required", **input_style), btforms.Dropdown("product_id", args=products, description=u"资费", required="required", **input_style), btforms.Textbox("add_value", rules.is_rmb, description=u"缴费金额", required="required", value="0", **input_style), btforms.Textbox("back_value", rules.is_rmb, description=u"退费金额", required="required", value="0", **input_style), btforms.Textbox("expire_date", rules.is_date, description=u"过期日期", value="0000-00-00", **input_style), btforms.Textbox("balance", rules.is_rmb, description=u"用户变更后余额", value="0.00", **input_style), btforms.Textbox("time_length", description=u"用户时长(小时)", value="0.00", **input_style), btforms.Textbox("flow_length", description=u"用户流量(MB)", value="0", **input_style), btforms.Textarea("operate_desc", rules.len_of(0, 512),description=u"操作描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户资费变更", action="/admin/account/change" )
default=3799, required="required", **input_style), btforms.Dropdown("time_type", description=u"时间类型", args=timetype.items(), required="required", **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"增加接入设备", action="/admin/bas/add") bas_update_form = btforms.Form(btforms.Hidden("id", description=u"编号"), btforms.Textbox("dns_name", rules.len_of(1, 128), description=u"DNS域名", help=u"动态IP专用", **input_style), btforms.Textbox("ip_addr", rules.is_ip, description=u"接入设备地址", **input_style), btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"接入设备名称", required="required", **input_style), btforms.Textbox("bas_secret",
def product_update_form(): return btforms.Form( btforms.Hidden("id", description=u"编号"), btforms.Hidden("product_policy", description=u""), btforms.Textbox("product_name", rules.len_of(4, 32), description=u"资费名称", required="required", **input_style), btforms.Textbox("product_policy_name", description=u"资费策略", readonly="readonly", required="required", **input_style), btforms.Dropdown("product_status", args=product_status_dict.items(), description=u"资费状态", required="required", **input_style), btforms.Textbox("fee_months", rules.is_number, description=u"买断授权月数", value=0, **input_style), btforms.Textbox("fee_times", rules.is_number3, description=u"买断时长(小时)", value=0, **input_style), btforms.Textbox("fee_flows", rules.is_number3, description=u"买断流量(MB)", value=0, **input_style), btforms.Textbox("fee_price", rules.is_rmb, description=u"资费价格(元)", required="required", **input_style), # btforms.Hidden("fee_period", rules.is_period, description=u"开放认证时段", **input_style), btforms.Textbox("concur_number", rules.is_number, description=u"并发数控制(0表示不限制)", required="required", **input_style), btforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC", required="required", **input_style), btforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN", required="required", **input_style), btforms.Textbox("input_max_limit", rules.is_number3, description=u"最大上行速率(Mbps)", required="required", **input_style), btforms.Textbox("output_max_limit", rules.is_number3, description=u"最大下行速率(Mbps)", required="required", **input_style), btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style), title=u"修改资费", action="/admin/product/update")
required="required", **input_style), btforms.Textbox("output_max_limit", rules.is_number3, description=u"最大下行速率(Mbps)", required="required", **input_style), btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style), title=u"修改资费", action="/admin/product/update") product_attr_add_form = btforms.Form(btforms.Hidden("product_id", description=u"资费编号"), btforms.Textbox("attr_name", rules.len_of(1, 255), description=u"策略名称", required="required", help=u"策略参考", **input_style), btforms.Textbox("attr_value", rules.len_of(1, 255), description=u"策略值", required="required", **input_style), btforms.Textbox("attr_desc", rules.len_of(1, 255), description=u"策略描述", required="required",
description=u"区域名称", required="required", **input_style), btforms.Textbox("node_desc", rules.len_of(2, 128), description=u"区域描述", required="required", **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"增加区域", action="/admin/node/add") node_update_form = btforms.Form(btforms.Hidden("id", description=u"区域ID"), btforms.Textbox("node_name", rules.len_of(2, 32), description=u"区域名称", **input_style), btforms.Textbox("node_desc", rules.len_of(2, 128), description=u"区域描述", required="required", **input_style), btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style), title=u"修改区域", action="/admin/node/update")
btforms.Textbox("account_number", description=u"用户账号", readonly="readonly", **input_style), btforms.Textbox("ip_address", description=u"用户IP地址", **input_style), btforms.Hidden("install_address", description=u"用户安装地址", required="required", **input_style), btforms.Textbox("new_password", description=u"认证密码(留空不修改)", **input_style), btforms.Textbox("user_concur_number", rules.is_number, description=u"用户并发数", required="required", **input_style), btforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC", **input_style), btforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN", **input_style), btforms.Textarea("account_desc", description=u"用户描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户策略修改", action="/admin/account/update" ) account_next_form = btforms.Form( btforms.Hidden("product_id", description=u"资费"), btforms.Hidden("old_expire", description=u""), btforms.Hidden("account_number", description=u"用户账号"), btforms.Textbox("months", rules.is_number, description=u"月数(包月有效)", value=0, required="required", **input_style), btforms.Textbox("giftdays", rules.is_number, description=u"赠送天数", value=0, required="required", **input_style), btforms.Textbox("fee_value", rules.is_rmb, description=u"缴费金额", value=0, required="required", **input_style), btforms.Textbox("expire_date", rules.is_date, description=u"过期日期", readonly="readonly", **input_style), btforms.Textarea("operate_desc", rules.len_of(0,512), description=u"操作描述", rows=4, **input_style), btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style), title=u"用户续费", action="/admin/account/next" ) account_charge_form = btforms.Form(