Bootstrap4 :: Settings Modules UI updated

This commit is contained in:
Sakthi002
2021-01-02 14:05:45 +05:30
committed by Manish Verma
parent a7ea1651e0
commit ae3a9dc631
13 changed files with 667 additions and 610 deletions

View File

@@ -1,15 +1,19 @@
@extends('themes.default1.admin.layout.admin')
<link href="{{asset("lb-faveo/css/faveo-css.css")}}" rel="stylesheet" type="text/css" />
@section('Settings')
active
class="nav-link active"
@stop
@section('settings-bar')
active
@section('settings-menu-parent')
class="nav-item menu-open"
@stop
@section('settings-menu-open')
class="nav nav-treeview menu-open"
@stop
@section('company')
class="active"
class="nav-link active"
@stop
@section('HeadInclude')
@@ -29,50 +33,48 @@ class="active"
@section('content')
<!-- open a form -->
{!! Form::model($companys,['url' => 'postcompany/'.$companys->id, 'method' => 'PATCH','files'=>true]) !!}
<!-- <div class="form-group {{ $errors->has('company_name') ? 'has-error' : '' }}"> -->
<!-- table -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{Lang::get('lang.company_settings')}}</h3>
<!-- check whether success or not -->
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fas fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!!Session::get('success')!!}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!!Session::get('fails')!!}
</div>
@endif
@if(Session::has('errors'))
<?php //dd($errors); ?>
<div class="alert alert-danger alert-dismissable">
<i class="fas fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('company_name'))
<li class="error-message-padding">{!! $errors->first('company_name', ':message') !!}</li>
@endif
@if($errors->first('website'))
<li class="error-message-padding">{!! $errors->first('website', ':message') !!}</li>
@endif
@if($errors->first('phone'))
<li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li>
@endif
</div>
@endif
<div class="card card-light">
<div class="card-header">
<h3 class="card-title">{{Lang::get('lang.company_settings')}}</h3>
</div>
<!-- Name text form Required -->
<div class="box-body">
<!-- check whether success or not -->
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"></i>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!!Session::get('success')!!}
</div>
@endif
<!-- failure message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{!!Session::get('fails')!!}
</div>
@endif
@if(Session::has('errors'))
<?php //dd($errors); ?>
<div class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"></i>
<b>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('company_name'))
<li class="error-message-padding">{!! $errors->first('company_name', ':message') !!}</li>
@endif
@if($errors->first('website'))
<li class="error-message-padding">{!! $errors->first('website', ':message') !!}</li>
@endif
@if($errors->first('phone'))
<li class="error-message-padding">{!! $errors->first('phone', ':message') !!}</li>
@endif
</div>
@endif
<div class="card-body">
<div class="row">
<div class="col-md-4">
<!-- comapny name -->
@@ -95,13 +97,14 @@ class="active"
{!! Form::text('phone',$companys->phone,['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-12">
<!-- comapny address -->
<div class="form-group {{ $errors->has('address') ? 'has-error' : '' }}">
{!! Form::label('address',Lang::get('lang.address')) !!}
{!! Form::textarea('address',$companys->address,['class' => 'form-control','size' => '30x5']) !!}
</div>
</div>
</div>
<div class="{{ $errors->has('address') ? 'has-error' : '' }}">
{!! Form::label('address',Lang::get('lang.address')) !!}
{!! Form::textarea('address',$companys->address,['class' => 'form-control','size' => '30x5']) !!}
</div>
<div class="row">
<div class="col-md-2">
<!-- logo -->
{!! Form::label('logo',Lang::get('lang.logo')) !!}
@@ -109,40 +112,41 @@ class="active"
{!! Form::file('logo') !!}
</div>
</div>
<div id="logo-display" style="display: block;">
@if($companys->logo != null)
<div class="col-md-2">
{!! Form::checkbox('use_logo') !!} <label> {!! Lang::get('lang.use_logo') !!}</label>
<div class="col-sm-10">
<div id="logo-display" style="display: block;">
<div class="row">
@if($companys->logo != null)
<div class="col-sm-2">
{!! Form::checkbox('use_logo') !!} <label> {!! Lang::get('lang.use_logo') !!}</label>
</div>
@endif
<?php $company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first(); ?>
@if($companys->logo != null)
<div class="col-md-3 image" data-content="{{Lang::get('lang.click-delete')}}">
<img src="{{asset('uploads/company')}}{{'/'}}{{$company->logo}}" alt="User Image" id="company-logo" width="100px" style="border:1px solid #DCD1D1" />
</div>
@endif
</div>
</div>
@endif
<?php $company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first(); ?>
@if($companys->logo != null)
<div class="col-md-2 image" data-content="{{Lang::get('lang.click-delete')}}">
<img src="{{asset('uploads/company')}}{{'/'}}{{$company->logo}}" alt="User Image" id="company-logo" width="100px" style="border:1px solid #DCD1D1" />
</div>
@endif
</div>
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'form-group btn btn-primary'])!!}
<div class="card-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
</div>
<!-- Modal -->
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
<div class="modal fade" id="myModal">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body" id="custom-alert-body" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary pull-left yes" data-dismiss="modal"></button>
<button type="button" class="btn btn-default no"></button>
</div>
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel"></h4>
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body" id="custom-alert-body" >
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-primary yes" data-dismiss="modal"></button>
<button type="button" class="btn btn-default no"></button>
</div>
</div>
</div>
@@ -151,14 +155,14 @@ class="active"
<script type="text/javascript">
$(document).ready(function() {
$(".image").on("click", function() {
$("#myModal").css("display", "block");
$('#myModal').modal('show');
$("#myModalLabel").html("{!! Lang::get('lang.delete-logo') !!}");
$(".yes").html("{!! Lang::get('lang.yes') !!}");
$(".no").html("{{Lang::get('lang.cancel')}}");
$("#custom-alert-body").html("{{Lang::get('lang.confirm')}}");
});
$('.no,.closemodal').on("click", function() {
$("#myModal").css("display", "none");
$('#myModal').modal('hide');
});
$('.yes').on('click', function() {
var src = $('#company-logo').attr('src').split('/');
@@ -175,9 +179,9 @@ class="active"
if (data == "true") {
var msg = "Logo deleted succesfully."
$("#logo-display").css("display", "none");
$("#myModal").css("display", "none");
$('#myModal').modal('hide');
} else {
$("#myModal").css("display", "none");
$('#myModal').modal('hide');
}
}
});