Skip to content

Commit

Permalink
Add warning about http being needed in url
Browse files Browse the repository at this point in the history
  • Loading branch information
KodeStar committed Mar 17, 2022
1 parent e52bc9c commit 41c2983
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
12 changes: 11 additions & 1 deletion public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ body {
opacity: 1;
width: auto;
height: auto;
overflow: auto;
overflow: visible;
}
.appoptions button.dark {
background: #1b1b1b;
Expand Down Expand Up @@ -825,6 +825,16 @@ body {
margin: 0;
}

.input {
position: relative;
}
.input .help {
position: absolute;
bottom: -22px;
left: 10px;
color: #c00;
}

div.create {
padding: 30px 15px;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion resources/assets/sass/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ body {
opacity: 1;
width: auto;
height: auto;
overflow: auto;
overflow: visible;
}
}
button.dark {
Expand Down Expand Up @@ -624,6 +624,15 @@ body {
}
}
}
.input {
position: relative;
.help {
position: absolute;
bottom: -22px;
left: 10px;
color: #c00;
}
}
div.create {
padding: 30px 15px;
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions resources/views/items/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<div class="optvalue">
<div class="input">
{!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!}
<small class="help">Don't forget http(s)://</small>
</div>
<div><button class="btn">Go</button></div>
</div>
Expand Down Expand Up @@ -67,6 +68,7 @@
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
<small class="help">Don't forget http(s)://</small>
</div>

<div class="input">
Expand Down
17 changes: 17 additions & 0 deletions resources/views/items/scripts.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@
$('.tags').select2();
if($('#appurl').val() !== '') {
if ($('#appurl').val().indexOf("://") !== -1) {
$('#appurl').parent().find('.help').hide()
}
}
if($('#website').val() !== '') {
if ($('#website').val().indexOf("://") !== -1) {
$('#website').parent().find('.help').hide()
}
}
$('#appurl, #website').on('input', function () {
if ($(this).val().indexOf("://") !== -1) {
$(this).parent().find('.help').hide()
}
})
$('#searchwebsite').on('click', 'button.btn', function (e) {
e.preventDefault()
let websiteurl = $('#searchwebsite input').val()
Expand Down

0 comments on commit 41c2983

Please sign in to comment.