Ejemplo n.º 1
0
def cmanager_update_post(db, render):
    form = cmanager_forms.cmanage_update_form(oprs=get_oprs(db))
    if not form.validates(source=request.forms):
        form = cmanager_forms.cmanage_update_form(oprs=get_oprs(db, copr_name=form.d.operator_name))
        return render("base_form", form=form)

    cmanager = db.query(models.SlcCustomerManager).get(form.d.id)
    cmanager.manager_name = form.d.manager_name
    cmanager.manager_mobile = form.d.manager_mobile
    cmanager.manager_email = form.d.manager_email
    cmanager.operator_name = form.d.operator_name

    db.commit()
    redirect("/cmanager/list")
Ejemplo n.º 2
0
def cmanager_update_post(db, render):
    form = cmanager_forms.cmanage_update_form(oprs=get_oprs(db))
    if not form.validates(source=request.forms):
        form = cmanager_forms.cmanage_update_form(
            oprs=get_oprs(db, copr_name=form.d.operator_name))
        return render("base_form", form=form)

    cmanager = db.query(models.SlcCustomerManager).get(form.d.id)
    cmanager.manager_name = form.d.manager_name
    cmanager.manager_mobile = form.d.manager_mobile
    cmanager.manager_email = form.d.manager_email
    cmanager.operator_name = form.d.operator_name

    db.commit()
    redirect("/cmanager/list")
Ejemplo n.º 3
0
def cmanager_update(db, render):
    manager_id = request.params.get("manager_id")
    cmanager = db.query(models.SlcCustomerManager).get(manager_id)
    form = cmanager_forms.cmanage_update_form(
        oprs=get_oprs(db, copr_name=cmanager.operator_name))
    form.fill(cmanager)
    return render("base_form", form=form)
Ejemplo n.º 4
0
def cmanager_update(db):   
    manager_id = request.params.get("manager_id")
    cmanager = db.query(models.SlcCustomerManager).get(manager_id)
    form = cmanager_forms.cmanage_update_form()
    form.fill(cmanager)
    return render("base_form",form=form)
Ejemplo n.º 5
0
def cmanager_update(db, render):
    manager_id = request.params.get("manager_id")
    cmanager = db.query(models.SlcCustomerManager).get(manager_id)
    form = cmanager_forms.cmanage_update_form(oprs=get_oprs(db, copr_name=cmanager.operator_name))
    form.fill(cmanager)
    return render("base_form", form=form)