Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
6940b1816e
|
@ -71,7 +71,7 @@ class ContextAwareValidator
|
|||
$validator = [];
|
||||
|
||||
if ($includeFormName) {
|
||||
$validator['formName'] = 'required|string|max:100';
|
||||
$validator['formName'] = 'required|string';
|
||||
}
|
||||
|
||||
foreach ($fields as $fieldName => $field) {
|
||||
|
|
|
@ -36,6 +36,8 @@ use Illuminate\Support\Facades\Log;
|
|||
|
||||
class ApplicationController extends Controller
|
||||
{
|
||||
|
||||
|
||||
private function canVote($votes): bool
|
||||
{
|
||||
$allvotes = collect([]);
|
||||
|
|
|
@ -82,6 +82,7 @@ class FormController extends Controller
|
|||
public function destroy(Request $request, Form $form)
|
||||
{
|
||||
$this->authorize('delete', $form);
|
||||
|
||||
$deletable = true;
|
||||
|
||||
if (! is_null($form) && ! is_null($form->vacancies) && $form->vacancies->count() !== 0 || ! is_null($form->responses)) {
|
||||
|
@ -97,6 +98,7 @@ class FormController extends Controller
|
|||
}
|
||||
|
||||
return redirect()->back();
|
||||
|
||||
}
|
||||
|
||||
public function preview(Request $request, Form $form)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// Load this on all pages requiring exit confirmation.
|
||||
$(window).bind('beforeunload', function(){
|
||||
return "Are you sure you want to exit this page? You might have unsaved work.";
|
||||
});
|
|
@ -10,6 +10,12 @@
|
|||
|
||||
@section('js')
|
||||
|
||||
<script>
|
||||
jQuery(window).bind('beforeunload', function(){
|
||||
return 'Are you sure you want to leave the form builder? You might have unsaved work.';
|
||||
});
|
||||
</script>
|
||||
|
||||
@if (session()->has('success'))
|
||||
|
||||
<script>
|
||||
|
|
|
@ -69,6 +69,8 @@
|
|||
<p>{{__('messages.application_r.welcome.line2', ['agerqr' => '18 ' . __('messages.application_r.welcome.yrs_old')])}}.</p>
|
||||
<p class="text-bold">{{__('messages.application_r.welcome.line3')}}.</p>
|
||||
|
||||
<p><i class="fab fa-markdown"></i> All fields support <a target="_blank" href="https://www.markdownguide.org/cheat-sheet/">Markdown</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -103,7 +103,8 @@
|
|||
<div class="mt-4 mb-3">
|
||||
|
||||
<h5>{{$content['title']}}</h5>
|
||||
<p>{{$content['response']}}</p>
|
||||
|
||||
<p>{!! GrahamCampbell\Markdown\Facades\Markdown::convertToHtml($content['response']) !!}</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo
|
|||
|
||||
Route::delete('forms/destroy/{form}', [FormController::class, 'destroy'])
|
||||
->name('destroyForm');
|
||||
|
||||
|
||||
Route::get('forms', [FormController::class, 'index'])
|
||||
->name('showForms');
|
||||
|
||||
|
|
Loading…
Reference in New Issue