Updated shared create & edit for blade components

Updated shared create & edit for blade components
This commit is contained in:
cp6 2022-03-02 15:00:09 +11:00
parent 5be2891985
commit 026643a7e0
2 changed files with 185 additions and 223 deletions

View File

@ -45,7 +45,8 @@
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"><span class="input-group-text">Has dedicated IP</span></div> <div class="input-group-prepend"><span class="input-group-text">Has dedicated IP</span>
</div>
<select class="form-control" name="has_dedicated_ip"> <select class="form-control" name="has_dedicated_ip">
<option value="0">No</option> <option value="0">No</option>
<option value="1">Yes</option> <option value="1">Yes</option>
@ -53,141 +54,135 @@
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"><span class="input-group-text">Dedicated IP</span></div> <div class="input-group-prepend"><span class="input-group-text">Dedicated IP</span>
</div>
<input type="text" name="dedicated_ip" class="form-control"></div> <input type="text" name="dedicated_ip" class="form-control"></div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-providers-select>
<div class="input-group-prepend"><span class="input-group-text">Provider</span></div> <x-slot name="current">1</x-slot>
<select class="form-control" name="provider_id"> </x-providers-select>
@foreach ($Providers as $provider)
<option value="{{ $provider['id'] }}">
{{ $provider['name'] }}
</option>
@endforeach
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Price</span></div> <x-slot name="title">Price</x-slot>
<input type="number" id="price" name="price" class="form-control" min="0" max="999" <x-slot name="name">price</x-slot>
step="0.01" required="" value="2.50"></div> <x-slot name="value">2.50</x-slot>
<x-slot name="max">9999</x-slot>
<x-slot name="step">0.01</x-slot>
<x-slot name="required"></x-slot>
</x-number-input>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-term-select></x-term-select>
<div class="input-group-prepend"><span class="input-group-text">Term</span></div>
<select class="form-control" id="payment_term" name="payment_term">
<option value="1" selected="">Monthly</option>
<option value="2">Quarterly</option>
<option value="3">Half annual (half year)</option>
<option value="4">Annual (yearly)</option>
<option value="5">Biennial (2 years)</option>
<option value="6">Triennial (3 years)</option>
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-currency-select></x-currency-select>
<div class="input-group-prepend"><span class="input-group-text">Currency</span></div>
<select class="form-control" id="currency" name="currency">
<option value="AUD">AUD</option>
<option value="USD" selected="">USD</option>
<option value="GBP">GBP</option>
<option value="EUR">EUR</option>
<option value="NZD">NZD</option>
<option value="JPY">JPY</option>
<option value="CAD">CAD</option>
</select></div>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-locations-select>
<div class="input-group-prepend"> <x-slot name="current">1</x-slot>
<span class="input-group-text">Location</span> </x-locations-select>
</div>
<select class="form-control" name="location_id">
@foreach ($Locations as $location)
<option value="{{ $location['id'] }}">
{{ $location['name'] }}
</option>
@endforeach
</select>
</div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-yes-no-select>
<div class="input-group-prepend"><span class="input-group-text">Was promo</span></div> <x-slot name="title">Was promo</x-slot>
<select class="form-control" name="was_promo"> <x-slot name="name">was_promo</x-slot>
<option value="0">No</option> <x-slot name="value">1</x-slot>
<option value="1">Yes</option> </x-yes-no-select>
</select></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"> <x-slot name="title">Owned since</x-slot>
<span class="input-group-text">Owned since</span> <x-slot name="name">owned_since</x-slot>
</div> <x-slot name="value">{{Carbon\Carbon::now()->format('Y-m-d') }}</x-slot>
<input type="date" class="form-control" id="owned_since" name="owned_since" value="{{Carbon\Carbon::now()->subYear(1)->format('Y-m-d') }}"></div> </x-date-input>
</div> </div>
<div class="col-12 col-md-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"><span class="input-group-text">Next due date</span> <x-slot name="title">Next due date</x-slot>
</div> <x-slot name="name">next_due_date</x-slot>
<input type="date" class="form-control next-dd" id="next_due_date" name="next_due_date" value="{{Carbon\Carbon::now()->addMonth(1)->format('Y-m-d') }}"> <x-slot name="value">{{Carbon\Carbon::now()->addDays(30)->format('Y-m-d') }}</x-slot>
</div> </x-date-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p>Limits:</p> <p class="text-muted"><b>Limits</b></p>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Domains</span></div> <x-slot name="title">Domains</x-slot>
<input type="number" name="domains" class="form-control" value="10" min="1" max="9999"> <x-slot name="name">domains</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">10</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Sub domains</span></div> <x-slot name="title">Sub domains</x-slot>
<input type="number" name="sub_domains" class="form-control" value="10" min="1" max="9999"> <x-slot name="name">sub_domains</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">20</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Disk</span></div> <x-slot name="title">Disk GB</x-slot>
<input type="number" name="disk" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">disk</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">50</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Email</span></div> <x-slot name="title">Email</x-slot>
<input type="number" name="email" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">Email</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Bandwidth</span> <x-slot name="title">Bandwidth GB</x-slot>
</div> <x-slot name="name">bandwidth</x-slot>
<input type="number" name="bandwidth" class="form-control" value="999" min="1" <x-slot name="value">1</x-slot>
max="99999"> <x-slot name="max">999999</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="step">1</x-slot>
</div> <x-slot name="value">500</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">FTP</span></div> <x-slot name="title">ftp</x-slot>
<input type="number" name="ftp" class="form-control" value="99" min="1" max="99999"> <x-slot name="name">ftp</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">DB</span></div> <x-slot name="title">DB</x-slot>
<input type="number" name="db" class="form-control" value="20" min="1" max="99999"> <x-slot name="name">db</x-slot>
</div> <x-slot name="value">1</x-slot>
<x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">100</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">

View File

@ -86,164 +86,132 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-providers-select>
<div class="input-group-prepend"><span class="input-group-text">Provider</span></div> <x-slot name="current">{{$shared[0]->provider_id}}</x-slot>
<select class="form-control" name="provider_id"> </x-providers-select>
<option value="0">Select provider</option>
@foreach ($providers as $pr)
<option
value="{{ $pr['id'] }}" {{ ( $pr['id'] === $shared[0]->provider_id) ? 'selected' : '' }}> {{ $pr['name'] }} </option>
@endforeach
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Price</span></div> <x-slot name="title">Price</x-slot>
<input type="number" id="price" name="price" class="form-control" min="0" max="999" <x-slot name="name">price</x-slot>
step="0.01" required="" value="{{ $shared[0]->price }}"></div> <x-slot name="value">{{$shared[0]->price}}</x-slot>
<x-slot name="max">9999</x-slot>
<x-slot name="step">0.01</x-slot>
<x-slot name="required"></x-slot>
</x-number-input>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-term-select>
<div class="input-group-prepend"><span class="input-group-text">Term</span></div> <x-slot name="current">{{$shared[0]->term}}</x-slot>
<select class="form-control" id="payment_term" name="payment_term"> </x-term-select>
<option value="1" {{ ($shared[0]->term === 1) ? 'selected' : '' }}>Monthly</option>
<option value="2" {{ ($shared[0]->term === 2) ? 'selected' : '' }}>Quarterly
</option>
<option value="3" {{ ($shared[0]->term === 3) ? 'selected' : '' }}>Half annual (half
year)
</option>
<option value="4" {{ ($shared[0]->term === 4) ? 'selected' : '' }}>Annual (yearly)
</option>
<option value="5" {{ ($shared[0]->term === 5) ? 'selected' : '' }}>Biennial (2
years)
</option>
<option value="6" {{ ($shared[0]->term === 6) ? 'selected' : '' }}>Triennial (3
years)
</option>
</select></div>
</div> </div>
<div class="col-md-3 mb-3"> <div class="col-md-3 mb-3">
<div class="input-group"> <x-currency-select>
<div class="input-group-prepend"><span class="input-group-text">Currency</span></div> <x-slot name="current">{{$shared[0]->currency}}</x-slot>
<select class="form-control" id="currency" name="currency"> </x-currency-select>
<option value="AUD" {{ ($shared[0]->currency === 'AUD') ? 'selected' : '' }}>AUD
</option>
<option value="USD" {{ ($shared[0]->currency === 'USD') ? 'selected' : '' }}>USD
</option>
<option value="GBP" {{ ($shared[0]->currency === 'GBP') ? 'selected' : '' }}>GBP
</option>
<option value="EUR" {{ ($shared[0]->currency === 'EUR') ? 'selected' : '' }}>EUR
</option>
<option value="NZD" {{ ($shared[0]->currency === 'NZD') ? 'selected' : '' }}>NZD
</option>
<option value="JPY" {{ ($shared[0]->currency === 'JPY') ? 'selected' : '' }}>JPY
</option>
<option value="CAD" {{ ($shared[0]->currency === 'CAD') ? 'selected' : '' }}>CAD
</option>
</select></div>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-locations-select>
<div class="input-group-prepend"> <x-slot name="current">{{$shared[0]->location_id}}</x-slot>
<span class="input-group-text">Location</span> </x-locations-select>
</div>
<select class="form-control" name="location_id">
<option value="999">Null</option>
@foreach ($locations as $item)
<option
value="{{ $item->id }}" {{ ( $item->id === $shared[0]->location_id) ? 'selected' : '' }}> {{ $item->name }} </option>
@endforeach
</select>
</div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-yes-no-select>
<div class="input-group-prepend"><span class="input-group-text">Was promo</span></div> <x-slot name="title">Promo price</x-slot>
<select class="form-control" name="was_promo"> <x-slot name="name">was_promo</x-slot>
<option value="0" {{ ($shared[0]->was_promo === 0) ? 'selected' : '' }}>No <x-slot name="value">{{ $shared[0]->was_promo }}</x-slot>
</option> </x-yes-no-select>
<option value="1" {{ ($shared[0]->was_promo === 1) ? 'selected' : '' }}>Yes
</option>
</select></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"> <x-slot name="title">Owned since</x-slot>
<span class="input-group-text">Owned since</span> <x-slot name="name">owned_since</x-slot>
</div> <x-slot name="value">{{$shared[0]->owned_since }}</x-slot>
<input type="date" class="form-control" id="owned_since" name="owned_since" </x-date-input>
value="{{ $shared[0]->owned_since }}"></div>
</div> </div>
<div class="col-12 col-md-3 mb-3"> <div class="col-12 col-md-3 mb-3">
<div class="input-group"> <x-date-input>
<div class="input-group-prepend"><span class="input-group-text">Next due date</span> <x-slot name="title">Next due date</x-slot>
</div> <x-slot name="name">next_due_date</x-slot>
<input type="date" class="form-control next-dd" id="next_due_date" name="next_due_date" <x-slot name="value">{{$shared[0]->next_due_date }}</x-slot>
value="{{ $shared[0]->next_due_date }}"> </x-date-input>
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<p>Limits:</p> <p class="text-muted"><b>Limits</b></p>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Domains</span></div> <x-slot name="title">Domains</x-slot>
<input type="number" name="domains" class="form-control" <x-slot name="name">domains</x-slot>
value="{{$shared[0]->domains_limit}}" <x-slot name="value">1</x-slot>
min="1" max="9999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->domains_limit}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Sub domains</span></div> <x-slot name="title">Sub domains</x-slot>
<input type="number" name="sub_domains" class="form-control" <x-slot name="name">sub_domains</x-slot>
value="{{$shared[0]->subdomains_limit}}" min="1" max="9999"> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->subdomains_limit}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Disk</span></div> <x-slot name="title">Disk GB</x-slot>
<input type="number" name="disk" class="form-control" value="{{$shared[0]->disk_as_gb}}" <x-slot name="name">disk</x-slot>
min="1" max="99999"> <x-slot name="value">1</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->disk_as_gb}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Email</span></div> <x-slot name="title">Email</x-slot>
<input type="number" name="email" class="form-control" <x-slot name="name">Email</x-slot>
value="{{$shared[0]->email_limit}}" <x-slot name="value">1</x-slot>
min="1" max="99999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->email_limit}}</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">Bandwidth</span> <x-slot name="title">Bandwidth GB</x-slot>
</div> <x-slot name="name">bandwidth</x-slot>
<input type="number" name="bandwidth" class="form-control" <x-slot name="value">1</x-slot>
value="{{$shared[0]->bandwidth}}" min="1" <x-slot name="max">999999</x-slot>
max="99999"> <x-slot name="step">1</x-slot>
<div class="input-group-append"><span class="input-group-text">GB</span></div> <x-slot name="value">{{$shared[0]->bandwidth}}</x-slot>
</div> </x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">FTP</span></div> <x-slot name="title">ftp</x-slot>
<input type="number" name="ftp" class="form-control" value="{{$shared[0]->ftp_limit}}" <x-slot name="name">ftp</x-slot>
min="1" <x-slot name="value">1</x-slot>
max="99999"> <x-slot name="max">999999</x-slot>
</div> <x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->ftp_limit}}</x-slot>
</x-number-input>
</div> </div>
<div class="col-12 col-lg-3 mb-4"> <div class="col-12 col-lg-3 mb-4">
<div class="input-group"> <x-number-input>
<div class="input-group-prepend"><span class="input-group-text">DB</span></div> <x-slot name="title">DB</x-slot>
<input type="number" name="db" class="form-control" value="{{$shared[0]->db_limit}}" <x-slot name="name">db</x-slot>
min="1" max="99999"> <x-slot name="value">1</x-slot>
</div> <x-slot name="max">999999</x-slot>
<x-slot name="step">1</x-slot>
<x-slot name="value">{{$shared[0]->db_limit}}</x-slot>
</x-number-input>
</div> </div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
@ -291,7 +259,6 @@
I still have this server I still have this server
</label> </label>
</div> </div>
<div> <div>
<button type="submit" <button type="submit"
class="btn btn-success px-4 py-1 mt-3"> class="btn btn-success px-4 py-1 mt-3">