Browse Source

Adiciona opção de excluir autoria

pull/244/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
cf6ed0334c
  1. 2
      materia/views.py
  2. 1
      templates/materia/autoria_edit.html

2
materia/views.py

@ -1290,6 +1290,8 @@ class AutoriaEditView(GenericView, FormMixin):
if 'salvar' in request.POST:
autoria.save()
elif 'excluir' in request.POST:
autoria.delete()
return self.form_valid(form)

1
templates/materia/autoria_edit.html

@ -62,6 +62,7 @@
</div>
<br />
<input type="submit" name="salvar" value="Salvar" class="btn btn-primary">
<input type="submit" value="Excluir" id="excluir" name="excluir" class="btn btn-danger" />
</form>
</fieldset>
</fieldset>

Loading…
Cancel
Save