Exemplo n.º 1
0
def edit_provider(provider_id):
    provider = provider_client.get_provider_by_id(provider_id)["provider_details"]
    form = ProviderForm(active=provider["active"], priority=provider["priority"])

    if form.validate_on_submit():
        provider_client.update_provider(provider_id, form.priority.data)
        return redirect(url_for(".view_providers"))

    return render_template("views/providers/edit-provider.html", form=form, provider=provider)
Exemplo n.º 2
0
def edit_provider(provider_id):
    provider = provider_client.get_provider_by_id(provider_id)['provider_details']
    form = ProviderForm(active=provider['active'], priority=provider['priority'])

    if form.validate_on_submit():
        provider_client.update_provider(provider_id, form.priority.data)
        return redirect(url_for('.view_providers'))

    return render_template('views/providers/edit-provider.html', form=form, provider=provider)
Exemplo n.º 3
0
def view_provider(provider_id):
    provider = provider_client.get_provider_by_id(provider_id)['provider_details']
    form = ProviderForm(active=provider['active'], priority=provider['priority'])

    if form.validate_on_submit():
        provider_client.update_provider(provider_id, form.priority.data)
        return redirect(url_for('.view_providers'))

    return render_template('views/provider.html', form=form, provider=provider)