Blame view

resources/views/install/database/create.blade.php 1.34 KB
b7c7a5f6   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  @extends('layouts.install')
  
  @section('header', trans('install.steps.database'))
  
  @section('content')
      {{ Form::textGroup('hostname', trans('install.database.hostname'), 'server', ['required' => 'required'], old('hostname', 'localhost'), 'col-md-12') }}
  
      {{ Form::textGroup('username', trans('install.database.username'), 'user', ['required' => 'required'], old('username'), 'col-md-12') }}
  
      {{ Form::passwordGroup('password', trans('install.database.password'), 'key', [], old('password'), 'col-md-12') }}
  
      {{ Form::textGroup('database', trans('install.database.name'), 'database', ['required' => 'required'], old('database'), 'col-md-12') }}
  @endsection
  
  @push('scripts')
      <script type="text/javascript">
          $(document).ready(function() {
              $('#next-button').attr('disabled', true);
  
              $('#hostname, #username, #database').keyup(function() {
                  inputCheck();
              });
          });
  
          function inputCheck() {
              hostname = $('#hostname').val();
              username = $('#username').val();
              database = $('#database').val();
  
              if (hostname != '' && username != '' && database != '') {
                  $('#next-button').attr('disabled', false);
              } else {
                  $('#next-button').attr('disabled', true);
              }
          }
      </script>
  @endpush