-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
5 changed files
with
172 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 104 additions & 1 deletion
105
resources/views/solution/partials/new-solution-form.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,104 @@ | ||
<p>solution-form-works!</p> | ||
<div class="container px-sm-0"> | ||
|
||
<div class="row"> | ||
<div class="col-12"> | ||
<h2>{{ __('solution.submission_form') }}</h2> | ||
</div> | ||
</div> | ||
|
||
<form id="problem-form" enctype="multipart/form-data" method="POST" action="{{ route('solutions.user-proposal-store', [request('project_slug'), request('problem_slug')]) }}"> | ||
|
||
@csrf | ||
|
||
<div class="container-fluid p-0"> | ||
|
||
<div class="row"> | ||
<div class="col-sm-12"> | ||
|
||
<input type="hidden" name="solution-owner-problem" value="{{auth()->user()->id}}"> | ||
|
||
<div class="solution-language-notifier"> | ||
The language for this solution is: {{ $viewModel->language->language_name }} | ||
</div> | ||
|
||
<div class="form-row"> | ||
<div class="form-group col-sm-12"> | ||
<label for="solution-title">Solution Title (<span class="red">*</span>)</label> | ||
<input type="text" | ||
id="solution-title" | ||
name="solution-title" | ||
class="form-control {{ $errors->has('solution-title') ? 'is-invalid' : '' }}" | ||
required | ||
placeholder="Solution Title" | ||
maxlength="100" | ||
{{ $errors->has('solution-title') ? 'aria-describedby="solution-title-feedback"' : '' }} | ||
value="{{ old('solution-title') ? old('solution-title') : '' }}" | ||
> | ||
<div id="solution-title-feedback" class="invalid-feedback"> | ||
<strong>{{ $errors->first('solution-title') }}</strong></div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<div class="form-group col-sm-12"> | ||
<label for="solution-description">Solution Description (<span | ||
class="red">*</span>)</label> | ||
<textarea | ||
id="solution-description" | ||
name="solution-description" | ||
class="form-control {{ $errors->has('solution-description') ? 'is-invalid' : '' }}" | ||
required | ||
rows="6" | ||
placeholder="Solution Description" | ||
maxlength="400" | ||
{{ $errors->has('solution-description') ? 'aria-describedby="solution-description-feedback"' : '' }} | ||
>{{ old('solution-description') ? old('solution-description') : '' }}</textarea> | ||
<div id="solution-description-feedback" class="invalid-feedback"> | ||
<strong>{{ $errors->first('solution-description') }}</strong></div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-row js-image-input-container"> | ||
<div class="col-sm-12"> | ||
<div class="form-group input-file-wrapper"> | ||
<label for="solution-image">Solution Image (max-size: 2MB)</label></label> | ||
<br><small>In order to update the currently selected image, please choose a new image by | ||
clicking the button below.</small><br> {{-- bookmark3 - fix spacing --}} | ||
<input type="file" | ||
id="solution-image" | ||
name="solution-image" | ||
class="form-control p-2 h-auto {{ $errors->has('solution-image') ? 'is-invalid' : '' }} js-image-input" | ||
accept="image/png,image/jpeg,image/jpg,image/webp" | ||
placeholder="Solution Image" | ||
> | ||
<div id="solution-image-feedback" class="invalid-feedback"> | ||
<strong>{{ $errors->first('solution-image') }}</strong></div> | ||
</div> | ||
<div class="image-preview-container"> | ||
<img | ||
loading="lazy" | ||
class="selected-image-preview js-selected-image-preview" | ||
src="/images/solution_default_image.png" | ||
alt=""> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div> | ||
<div class="container-fluid p-0"> | ||
<div class="row p-0"> | ||
<div class="col-lg-2 col-md-3 col-sm-12"> | ||
<input class="btn btn-primary btn-slim w-100 mb-3" id="submit-form" type="submit" value="Save"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</form> | ||
|
||
</div> |
36 changes: 36 additions & 0 deletions
36
resources/views/solution/partials/propose-solution-overview.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class="container px-sm-0"> | ||
|
||
<div class="row"> | ||
<div class="col-12 my-4 my-lg-5 pt-4"> | ||
<x-go-back-link href="/{{ app()->getLocale() .'/'. $viewModel->project->slug . '/problems/' . $viewModel->problem->slug }}" | ||
class="d-none d-lg-block">{{ __("project-problems.back") }}</x-go-back-link> | ||
</div> | ||
</div> | ||
|
||
<div class="row propose-solution-description"> | ||
|
||
<div class="col-12"> | ||
<h1 class="section-title text-center">{{ __('solution.share_your_solution') }}</h1> | ||
<div class="section-body pb-5 pb-lg-0"> | ||
<p>{{ __('solution.do_you_have_an_idea') }}</p> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="row propose-solution-description"> | ||
|
||
<div class="col-12 col-lg-7"> | ||
<h2 class="section-title">{{ __("solution.about_the_problem") }}</h2> | ||
<div class="section-body pb-5 pb-lg-0"> | ||
<p>{!! $viewModel->problem->currentTranslation->description !!}</p> | ||
</div> | ||
</div> | ||
|
||
<div class="col-12 col-lg-4 offset-lg-1 align-self-end text-center"> | ||
<img src="/images/problems/problem-page-intro-top-question@2x.png" alt="" width="382" height="238" class="img-fluid"> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters