WIP: Road to 1.0.0 #1

Draft
miguel456 wants to merge 123 commits from develop into master
1 changed files with 1 additions and 19 deletions
Showing only changes of commit 685ec75d0c - Show all commits

View File

@ -83,22 +83,6 @@ class FormController extends Controller
{ {
$this->authorize('delete', $form); $this->authorize('delete', $form);
$request->session()->put('pendingObjectID', $form->id);
$request->session()->put('openConfirmationDialog', true);
return redirect()->back();
}
public function performConfirmedDeletion(Request $request, Form $form)
{
$this->authorize('delete', $form);
if (!$request->has('confirmed') && $request->confirmed !== 'yes')
{
$request->session()->flash('error', 'You must confirm this action.');
return redirect()->back();
}
$deletable = true; $deletable = true;
if (! is_null($form) && ! is_null($form->vacancies) && $form->vacancies->count() !== 0 || ! is_null($form->responses)) { if (! is_null($form) && ! is_null($form->vacancies) && $form->vacancies->count() !== 0 || ! is_null($form->responses)) {
@ -113,10 +97,8 @@ class FormController extends Controller
$request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.'); $request->session()->flash('error', 'You cannot delete this form because it\'s tied to one or more applications and ranks, or because it doesn\'t exist.');
} }
$request->session()->forget('pendingObjectID');
$request->session()->forget('openConfirmationDialog');
return redirect()->back(); return redirect()->back();
} }
public function preview(Request $request, Form $form) public function preview(Request $request, Form $form)