Skip to content

Commit

Permalink
Add Agreement Enable/Disable, Company Information
Browse files Browse the repository at this point in the history
  • Loading branch information
bishwajitcadhikary committed Jul 22, 2023
1 parent 7ed9697 commit 16cbd45
Show file tree
Hide file tree
Showing 19 changed files with 263 additions and 144 deletions.
94 changes: 94 additions & 0 deletions AGREEMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<p><strong>IMPORTANT - READ CAREFULLY:</strong> This End User License Agreement
("Agreement") is a legal agreement between you (either an individual or an entity)
and
the author of the software product ("Author") for the software product ("Software
Product") that you have purchased from Codecanyon. By installing, copying, or
otherwise
using the Software Product, you agree to be bound by the terms of this Agreement.
</p>

<h5>Grant of License</h5>
<p>Subject to the terms and conditions of this Agreement, the Author hereby grants to
you a
limited, non-exclusive, non-transferable license to use the Software Product for
your
personal or business use.</p>

<h5>Restrictions: (You may not)</h5>
<ol class="mb-3">
<li>Use, copy, modify, or distribute the Software Product except as expressly
provided
in this Agreement;
</li>
<li>Reverse engineer, decompile, or disassemble the Software Product;</li>
<li>Rent, lease, or lend the Software Product;</li>
<li>Remove any copyright, trademark, or other proprietary notices from the Software
Product;
</li>
<li>Transfer the Software Product or your license to use the Software Product to any
third party.
</li>
</ol>

<h5>Ownership</h5>
<p>The Software Product is owned by the Author and is protected by copyright laws and
international treaty provisions. You acknowledge that no title to the intellectual
property in the Software Product is transferred to you. You further acknowledge that
title and full ownership rights to the Software Product will remain the exclusive
property of the Author and/or its suppliers.</p>

<h5>Support</h5>
<p>The Author may provide you with support services related to the Software Product
("Support Services"). Any supplemental software code provided to you as part of the
Support Services shall be considered part of the Software Product and subject to the
terms and conditions of this Agreement.</p>

<h5>Warranty and Disclaimer</h5>
<p>THE SOFTWARE PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND
FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT THE SOFTWARE
PRODUCT
WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE PRODUCT WILL BE
UNINTERRUPTED OR ERROR-FREE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
THE
SOFTWARE PRODUCT IS WITH YOU. SHOULD THE SOFTWARE PRODUCT PROVE DEFECTIVE, YOU (AND
NOT
THE AUTHOR) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR
CORRECTION?
</p>

<h5>Limitation of Liability</h5>
<p>IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE PRODUCT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

<h5>Termination</h5>
<p>This Agreement will terminate immediately without notice from the Author if you fail
to
comply with any provision of this Agreement. Upon termination, you must immediately
cease all use of the Software Product and destroy all copies of the Software
Product.
</p>

<h5>Governing Law</h5>
<p>This Agreement shall be governed by and construed in accordance with the laws of the
jurisdiction in which the Author resides.</p>

<h5>Entire Agreement</h5>
<p>This Agreement constitutes the entire agreement between the parties with respect to
the
use of the Software Product and supersedes all prior or contemporaneous
understandings
regarding the such subject matter. No amendment to or modification of this Agreement
will be binding unless in writing and signed by the Author.</p>

<h5>Acknowledgment</h5>
<p>BY USING THE SOFTWARE PRODUCT, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT,
UNDERSTAND</p>
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"brotzka/laravel-dotenv-editor": "^2.2",
"illuminate/contracts": "^10.0",
"php-flasher/flasher-laravel": "^1.13",
"spatie/laravel-markdown": "^2.3",
"spatie/laravel-package-tools": "^1.14.0"
},
"autoload": {
Expand Down
3 changes: 2 additions & 1 deletion config/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
'support_phone' => '+8801322635808',
],

'user_agreement_file_path' => env('USER_AGREEMENT_FILE_PATH', 'user-agreement.txt'),
'show_user_agreement' => env('SHOW_USER_AGREEMENT', true),
'user_agreement_file_path' => env('USER_AGREEMENT_FILE_PATH'),

/*
* -------------------------------------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions resources/dist/css/jquery-confirm.min.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions resources/dist/js/jquery-confirm.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion resources/views/agreement.md

This file was deleted.

57 changes: 50 additions & 7 deletions resources/views/database.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
])

@section('content')
<form action="{{ route('installer.database.store') }}" method="post" class="ajaxform">
<form action="{{ route('installer.database.store') }}" method="post" class="ajaxform" id="databaseForm">
<input type="hidden" name="force" value="0">
<div class="row g-4">
<div class="col-12 col-md-6">
<label for="driver">Database Driver</label>
Expand Down Expand Up @@ -32,6 +33,12 @@
required>
</div>

<div class="col-12 col-md-6">
<label for="database">Database Name</label>
<input type="text" class="form-control" name="database" id="database" placeholder="Database Name"
required>
</div>

<div class="col-12 col-md-6">
<label for="username">Database User Username</label>
<input type="text" class="form-control" name="username" id="username"
Expand All @@ -44,12 +51,6 @@
placeholder="Database User Password">
</div>

<div class="col-12 col-md-6">
<label for="database">Database Name</label>
<input type="text" class="form-control" name="database" id="database" placeholder="Database Name"
required>
</div>

<div class="button-group">
<div class="row justify-content-end">
<div class="col-12 col-md-6">
Expand All @@ -75,5 +76,47 @@
$('#port').val('1433')
}
})
$('#databaseForm').on('ajaxFormError', function (e, response) {
response = response.responseJSON
if(response?.data?.ask_for_force){
$.confirm({
title: 'Are you sure!',
content: 'Your database is not empty, do you want to force the installation?',
theme: 'modern',
icon: 'bi bi-database-lock text-warning',
autoClose: 'cancel|8000',
buttons: {
yes: {
btnClass: 'btn-warning',
action: function () {
$.confirm({
title: 'This action is irreversible!',
content: 'I understand the consequences, proceed anyway?',
theme: 'modern',
icon: 'bi bi-database-gear text-danger',
autoClose: 'cancel|8000',
buttons: {
proceed: {
btnClass: 'btn-danger',
action: function () {
$('#databaseForm').find('input[name="force"]').val(1)
$('#databaseForm').submit()
}
},
cancel: function () {
}
}
})
}
},
no: function () {
}
}
});
}
})
</script>
@endpush
157 changes: 43 additions & 114 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,126 +1,55 @@
@extends('installer::layouts.app', [
'title' => 'End-user License Agreement'
'title' => $showAgreement ? 'End-user License Agreement' : 'Welcome to the Installer',
])

@section('content')
<div class="scrollable">
<p><strong>IMPORTANT - READ CAREFULLY:</strong> This End User License Agreement
("Agreement") is a legal agreement between you (either an individual or an entity)
and
the author of the software product ("Author") for the software product ("Software
Product") that you have purchased from Codecanyon. By installing, copying, or
otherwise
using the Software Product, you agree to be bound by the terms of this Agreement.
</p>

<h5>Grant of License</h5>
<p>Subject to the terms and conditions of this Agreement, the Author hereby grants to
you a
limited, non-exclusive, non-transferable license to use the Software Product for
your
personal or business use.</p>

<h5>Restrictions: (You may not)</h5>
<ol class="mb-3">
<li>Use, copy, modify, or distribute the Software Product except as expressly
provided
in this Agreement;
</li>
<li>Reverse engineer, decompile, or disassemble the Software Product;</li>
<li>Rent, lease, or lend the Software Product;</li>
<li>Remove any copyright, trademark, or other proprietary notices from the Software
Product;
</li>
<li>Transfer the Software Product or your license to use the Software Product to any
third party.
</li>
</ol>

<h5>Ownership</h5>
<p>The Software Product is owned by the Author and is protected by copyright laws and
international treaty provisions. You acknowledge that no title to the intellectual
property in the Software Product is transferred to you. You further acknowledge that
title and full ownership rights to the Software Product will remain the exclusive
property of the Author and/or its suppliers.</p>

<h5>Support</h5>
<p>The Author may provide you with support services related to the Software Product
("Support Services"). Any supplemental software code provided to you as part of the
Support Services shall be considered part of the Software Product and subject to the
terms and conditions of this Agreement.</p>

<h5>Warranty and Disclaimer</h5>
<p>THE SOFTWARE PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND
FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT THE SOFTWARE
PRODUCT
WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE PRODUCT WILL BE
UNINTERRUPTED OR ERROR-FREE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
THE
SOFTWARE PRODUCT IS WITH YOU. SHOULD THE SOFTWARE PRODUCT PROVE DEFECTIVE, YOU (AND
NOT
THE AUTHOR) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR
CORRECTION?
</p>

<h5>Limitation of Liability</h5>
<p>IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE PRODUCT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>

<h5>Termination</h5>
<p>This Agreement will terminate immediately without notice from the Author if you fail
to
comply with any provision of this Agreement. Upon termination, you must immediately
cease all use of the Software Product and destroy all copies of the Software
Product.
</p>

<h5>Governing Law</h5>
<p>This Agreement shall be governed by and construed in accordance with the laws of the
jurisdiction in which the Author resides.</p>

<h5>Entire Agreement</h5>
<p>This Agreement constitutes the entire agreement between the parties with respect to
the
use of the Software Product and supersedes all prior or contemporaneous
understandings
regarding the such subject matter. No amendment to or modification of this Agreement
will be binding unless in writing and signed by the Author.</p>
@if($showAgreement)
<div class="scrollable">
<x-markdown>
{!! $agreement !!}
</x-markdown>
</div>

<h5>Acknowledgment</h5>
<p>BY USING THE SOFTWARE PRODUCT, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT,
UNDERSTAND</p>
</div>
<form action="{{ route('installer.agreement.index') }}" method="post">
@csrf
<div class="button-group">
<div class="row g-4 justify-content-end">
<div class="col-12 col-md-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" id="agreeCheckbox" name="agree" required>
<label class="form-check-label text-primary" for="agreeCheckbox">
I have read all the rules and agree with these.
</label>
</div>
</div>

<form action="{{ route('installer.agreement.index') }}" method="post">
@csrf
<div class="button-group">
<div class="row g-4 justify-content-end">
<div class="col-12 col-md-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="1" id="agreeCheckbox" name="agree"
required>
<label class="form-check-label text-primary" for="agreeCheckbox">
I have read all the rules and agree with these.
</label>
<div class="col-12 col-md-6">
<button type="submit" id="continueButton" class="btn btn-primary disabled w-100">
I Agree & Continue
<i class="bi bi-arrow-right"></i>
</button>
</div>
</div>
</div>
</form>
@else
<form action="{{ route('installer.agreement.index') }}" method="post">
@csrf
<div class="button-group">
<div class="row g-4 justify-content-end">
<div class="col-12">
<input type="hidden" value="1" id="agreeCheckbox" name="agree" required>
<p>Enjoy a seamless installation journey with clear, step-by-step guidance. Let's begin! 🚀</p>
</div>

<div class="col-12 col-md-6">
<button type="submit" id="continueButton" class="btn btn-primary disabled w-100">
I Agree & Continue
<i class="bi bi-arrow-right"></i>
</button>
<div class="col-12">
<button type="submit" id="continueButton" class="btn btn-primary w-100">
Continue
<i class="bi bi-arrow-right"></i>
</button>
</div>
</div>
</div>
</div>
</form>
</form>
@endif
@endsection
2 changes: 2 additions & 0 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<link rel="stylesheet" href="{{ asset('vendor/installer/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/installer/css/bootstrap-icons.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/installer/css/nice-select.css') }}">
<link rel="stylesheet" href="{{ asset('vendor/installer/css/jquery-confirm.min.css') }}">

<!-- Main Style -->
<link rel="stylesheet" href="{{ asset('vendor/installer/style.css') }}">
Expand All @@ -41,6 +42,7 @@
<script src="{{ asset('vendor/installer/js/jquery.form.min.js') }}"></script>
<script src="{{ asset('vendor/installer/js/jquery.validate.js') }}"></script>
<script src="{{ asset('vendor/installer/js/flasher.min.js') }}"></script>
<script src="{{ asset('vendor/installer/js/jquery-confirm.min.js') }}"></script>
<script src="{{ asset('vendor/installer/js/active.js') }}"></script>

@stack('pageScripts')
Expand Down
3 changes: 1 addition & 2 deletions resources/views/layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<div class="footer">
<p class="mb-0 text-center">
Facing problems in the installation process?
<br>Email us -
<a href="mailto:{{ config('installer.company.support_email') }}">{{ config('installer.company.support_email') }}</a>
<br>Email us - <a href="mailto:{{ config('installer.company.support_email') }}">{{ config('installer.company.support_email') }}</a>
</p>
</div>
</div>
Loading

0 comments on commit 16cbd45

Please sign in to comment.