def delete(): card = request.vars["card"] form = BOOTUPFORM.confirm("Delete", "btn-danger", {"Back": URL("card", "index")}) if form.accepted: db(db.card.idcard == card.idcard).delete() redirect(URL("card", "index")) return dict(form=form)
def delete(): pledge = request.vars['pledge'] form = BOOTUPFORM.confirm('Delete', 'btn-danger', {'Back': URL('pledge', 'view', args=[pledge.project.idproject])}) if form.accepted: db(db.pledege.idpledge == pledge.pledge.idpledge).delete() redirect(URL('pledge', 'view', args=[pledge.pledge.idpledge])) return dict(form=form)
def delete(): address = request.vars['address'] form = BOOTUPFORM.confirm('Delete', 'btn-danger', {'Back': URL('card', 'index')}) if form.accepted: db(db.address.idaddress == address.idaddress).delete() redirect(URL('address', 'index')) return dict(form=form)
def delete(): project = request.vars['project'] form = BOOTUPFORM.confirm('Delete', 'btn-danger', {'Back': URL('user', 'projects')}) if form.accepted: project.project.rawdelete() redirect(URL('user', 'projects')) return dict(project=project, form=form)
def close(): project = request.vars['project'] form = BOOTUPFORM.confirm('Close', 'btn-warning', {'Back': URL('user', 'projects')}) if form.accepted: db.closedproject.insert(openprojectid=project.project.idproject) redirect(URL('user', 'projects')) return dict(record=project, form=form)
def delete(): reward = request.vars['reward'] form = BOOTUPFORM.confirm('Delete', 'btn-danger', {'Back': URL('pledge', 'view', args=[reward.project.idproject])}) projectid = reward.reward.projectid if form.accepted: reward.reward.rawdelete() redirect(URL('reward', 'view', args=[projectid])) return dict(form=form, projectid=projectid)
def open(): project = request.vars['project'] form = BOOTUPFORM.confirm('Open', 'btn-primary', {'Back': URL('user', 'projects')}) if form.accepted: # If the project has previously been opened, we delete the projectclosed record, otherwise create an openproject #record if db(db.openproject.projectid == project.project.idproject).count() > 0: db(db.closedproject.openprojectid == project.project.idproject).delete() else: db.openproject.insert(projectid=project.project.idproject) redirect(URL('project', 'view', args=[project.project.idproject])) return dict(project=project, form=form)