update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('form')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{{$form->formname}}</h1>
|
||||
@stop
|
||||
@section('content')
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
@foreach($fields as $field)
|
||||
<?php
|
||||
$form = App\Http\Controllers\Admin\helpdesk\FormController::getForm($field);
|
||||
?>
|
||||
<div class="col-md-10">
|
||||
{!! $form !!}
|
||||
</div>
|
||||
@if($field->values()->get()->count()>0)
|
||||
<div class="col-md-2">
|
||||
@include('themes.default1.admin.helpdesk.manage.form.childpopup')
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
@@ -0,0 +1,34 @@
|
||||
<a href="#child" data-toggle="modal" class="btn btn-primary" data-target="#child{{$field->id}}">Add Child</a>
|
||||
<div class="modal fade" id="child{{$field->id}}">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"></h4>
|
||||
{!! Form::model($field,['url'=>'forms/field/'.$field->id.'/child','method'=>'POST']) !!}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- Form -->
|
||||
<div class="row">
|
||||
@forelse($field->values()->get() as $value)
|
||||
<div class="col-md-12">
|
||||
<b>{{$value->field_value}}</b>
|
||||
{!! Form::select($value->id,[''=>'Select','Forms'=>$select_forms],$value->childId(),['class'=>'form-control']) !!}
|
||||
</div>
|
||||
@empty
|
||||
<div class="col-md-12">
|
||||
<p>No values</p>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id="close" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
|
||||
<input type="submit" class="btn btn-primary" value="{{Lang::get('lang.save')}}">
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /Form -->
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
@@ -32,9 +32,11 @@ class="active"
|
||||
{!! Form::open(['action' => 'Admin\helpdesk\FormController@store','method' => 'post']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
|
@@ -8,7 +8,7 @@ active
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('form')
|
||||
@section('forms')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@@ -16,91 +16,148 @@ class="active"
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
<h1>{!! Lang::get('lang.forms') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
{!! Form::model($forms,['url' => 'form/'.$forms->id,'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title"style="margin-left:-10px">{{Lang::get('lang.create')}}</h2>{!! Form::submit(Lang::get('lang.save'),['class'=>'pull-right btn btn-primary'])!!}</div>
|
||||
<!-- title: text -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Label -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('label') ? 'has-error' : '' }}">
|
||||
{!! Form::label('label',Lang::get('lang.label')) !!}
|
||||
{!! $errors->first('label', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('label',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head type -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('type') ? 'has-error' : '' }}">
|
||||
{!! Form::label('type',Lang::get('lang.type')) !!}
|
||||
{!! $errors->first('type', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('type', [''=>'Select a Type','types'=>$type->lists('type','id')] ,null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head Vissibility -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group {{ $errors->has('visibility') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!}
|
||||
{!! $errors->first('visibility', '<spam class="help-block">:message</spam>') !!}
|
||||
{!!Form::select('visibility', [''=>'Select a Visibility','visibilities' =>$visibility->lists('visibility','id')],null,['class' => 'form-control'] ) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- declare table head variable -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
{!! Form::label('variable',Lang::get('lang.variable')) !!}
|
||||
{!! Form::text('variable',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- instruction: textarea -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('instruction',Lang::get('lang.instruction')) !!}
|
||||
{!! Form::textarea('instruction',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /table -->
|
||||
|
||||
<!-- txt area -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control','size' => '10x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.edit') !!}</h3>
|
||||
</div>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.instructions') !!}</h3>
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.instructions_on_creating_form') !!}.</div>
|
||||
</div>
|
||||
<div class="box-body with-border">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@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">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
{!! Form::model($form,['route'=>['forms.update',$form->id],'method'=>'PATCH']) !!}
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<div class="col-md-4">
|
||||
<h4 style="text-align: center">{!! Lang::get('lang.form_name') !!}: <span class="text-red"> *</span></h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{!! Form::text('formname',null,['class'=>'form-control']) !!}
|
||||
<!--<input type="text" name="formname" class="form-control">-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="box-title">{!! Lang::get('lang.adding_fields') !!}</h3>
|
||||
<div class="callout callout-default col-md-4"> {!! Lang::get('lang.click_add_fields_button_to_add_fields') !!} </div>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary addField" value="Show Div" onclick="showDiv()" ><i class="fa fa-plus"></i> {!! Lang::get('lang.add_fields') !!}</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="box-body" id="welcomeDiv">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>{!! Lang::get('lang.label') !!} </th>
|
||||
<th>{!! Lang::get('lang.name') !!} </th>
|
||||
<th>{!! Lang::get('lang.type') !!} </th>
|
||||
<th>{!! Lang::get('lang.values(selected_fields)') !!} </th>
|
||||
<th>{!! Lang::get('lang.required') !!} </th>
|
||||
<th>{!! Lang::get('lang.action') !!} </th>
|
||||
</thead>
|
||||
<tbody class="inputField">
|
||||
|
||||
@forelse($fields as $key=>$field)
|
||||
|
||||
<tr>
|
||||
<td><input type="text" name="label[]" value="{{$field->label}}" class="form-control"></td>
|
||||
<td><input type="text" name="name[]" value="{{$field->name}}" class="form-control"></td>
|
||||
|
||||
<td>{!! Form::select('type[]',['text'=>'text','email'=>'email','password'=>'password','textarea'=>'textarea','select'=>'select','radio'=>'radio','checkbox'=>'checkbox','hidden'=>'hidden'],$field->type,['class'=>'form-control']) !!}</td>
|
||||
<td><input type="text" name="value[]" value="{{$field->valuesAsString()}}" class="form-control"></td>
|
||||
|
||||
<td>{!! Lang::get("lang.yes") !!} {!! Form::radio('required['.$key.']',1,true) !!} {!! Lang::get("lang.no") !!} {!! Form::radio('required['.$key.']',0,$field->nonRequiredFieldForCheck()) !!}</td>
|
||||
<td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td>
|
||||
</tr>
|
||||
@empty
|
||||
|
||||
@endforelse
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" class="btn btn-primary" value="{!! Lang::get('lang.save_form') !!}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
function showDiv() {
|
||||
document.getElementById('welcomeDiv').style.display = "block";
|
||||
}
|
||||
$(document).ready(function () {
|
||||
var max_fields = 10;
|
||||
var wrapper = $(".inputField");
|
||||
var add_button = $(".addField");
|
||||
var x = 1;
|
||||
$(add_button).click(function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
if (x < max_fields) {
|
||||
x++;
|
||||
$(wrapper).append('<tr>\n\
|
||||
<td><input type="text" class="form-control" name="label[]"></td>\n\
|
||||
<td><input type="text" class="form-control" name="name[]"></td>\n\
|
||||
<td><select name="type[]" class="form-control"><option>text</option><option>email</option><option>password</option><option>textarea</option><option>select</option><option>radio</option><option>checkbox</option><option>hidden</option></select>\n\
|
||||
</td><td><input type="text" name="value[]" class="form-control"></td>\n\
|
||||
<td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[]" value=0></td>\n\
|
||||
<td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td></tr>');
|
||||
}
|
||||
});
|
||||
$(wrapper).on("click", ".remove_field", function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
$(this).closest('tr').remove();
|
||||
x--;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
|
@@ -36,20 +36,33 @@ class="active"
|
||||
<div class="callout callout-default" style="font-style: oblique;">{!! Lang::get('lang.instructions_on_creating_form') !!}.</div>
|
||||
</div>
|
||||
<div class="box-body with-border">
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
@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">×</button>
|
||||
{{Session::get('success')}}
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b><br>
|
||||
|
||||
<li class="error-message-padding" >{{Session::get('fails')}}</li>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('warn')}}
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_properties') !!}</h3>
|
||||
@@ -77,7 +90,7 @@ class="active"
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="box-body" id="welcomeDiv" style="display:none;">
|
||||
<div class="box-body" id="welcomeDiv">
|
||||
<table id="example2" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th>{!! Lang::get('lang.label') !!} </th>
|
||||
@@ -88,7 +101,27 @@ class="active"
|
||||
<th>{!! Lang::get('lang.action') !!} </th>
|
||||
</thead>
|
||||
<tbody class="inputField">
|
||||
<tr></tr>
|
||||
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="label[]"></td>
|
||||
<td><input type="text" class="form-control" name="name[]"></td>
|
||||
<td>
|
||||
<select name="type[]" class="form-control">
|
||||
<option>text</option>
|
||||
<option>email</option>
|
||||
<option>password</option>
|
||||
<option>textarea</option>
|
||||
<option>select</option>
|
||||
<option>radio</option>
|
||||
<option>checkbox</option>
|
||||
<option>hidden</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" name="value[]" class="form-control"></td>
|
||||
<td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[0]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[0]" value=0></td>
|
||||
<td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -106,13 +139,13 @@ class="active"
|
||||
var max_fields = 10;
|
||||
var wrapper = $(".inputField");
|
||||
var add_button = $(".addField");
|
||||
var x = 1;
|
||||
var x = 0;
|
||||
$(add_button).click(function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
if (x < max_fields) {
|
||||
x++;
|
||||
$(wrapper).append('<tr><td><input type="text" class="form-control" name="label[]"></td><td><input type="text" class="form-control" name="name[]"></td><td><select name="type[]" class="form-control"><option>text</option><option>email</option><option>password</option><option>textarea</option><option>select</option><option>radio</option><option>checkbox</option></select></td><td><textarea name="value[]" class="form-control"></textarea></td><td>{!! Lang::get("lang.yes") !!} <input type=radio name="required[' + x + '][]" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required[' + x + '][]" value=0></td><td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td></tr>');
|
||||
$(wrapper).append('<tr><td><input type="text" class="form-control" name="label[]"></td><td><input type="text" class="form-control" name="name[]"></td><td><select name="type[]" class="form-control"><option>text</option><option>email</option><option>password</option><option>textarea</option><option>select</option><option>radio</option><option>checkbox</option><option>hidden</option></select></td><td><input type="text" name="value[]" class="form-control"></td><td>{!! Lang::get("lang.yes") !!} <input type=radio name="required['+x+']" value=1 checked> {!! Lang::get("lang.no") !!} <input type=radio name="required['+x+']" value=0></td><td><button type="button" class="remove_field btn btn-danger"><i class="fa fa-trash-o"></i>  {!! Lang::get("lang.remove") !!}</button></td></tr>');
|
||||
}
|
||||
});
|
||||
$(wrapper).on("click", ".remove_field", function(e)
|
||||
|
@@ -57,8 +57,19 @@ class="active"
|
||||
@foreach($forms as $form)
|
||||
<tr>
|
||||
<td>{!! $form->formname !!}</td>
|
||||
<td>{!! link_to_route('forms.show', Lang::get('lang.view_this_form') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$form->id}}delete">{!! Lang::get('lang.delete_from') !!}</button>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.edit', Lang::get('lang.edit') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.show', Lang::get('lang.view_this_form') ,[$form->id],['id'=>'View','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
{!! link_to_route('forms.add.child', 'Add Child' ,[$form->id],['id'=>'add-child','class'=>'btn btn-primary btn-sm']) !!}
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-sm" data-toggle="modal" data-target="#{{$form->id}}delete">{!! Lang::get('lang.delete_from') !!}</button>
|
||||
</div>
|
||||
<div class="modal fade" id="{{$form->id}}delete">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@@ -43,44 +43,40 @@ class="active"
|
||||
<!-- -->
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<?php $id = App\Model\helpdesk\Form\Forms::where('id', $id)->first(); ?>
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_name') !!} : {!! $id->formname !!}</h3>
|
||||
<h3 class="box-title">{!! Lang::get('lang.form_name') !!} : {!! $form->formname !!}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@foreach($fields as $field)
|
||||
<?php
|
||||
$i = $id->id;
|
||||
$form_datas = App\Model\helpdesk\Form\Fields::where('forms_id', '=', $i)->get();
|
||||
// dd($form_datas);
|
||||
foreach ($form_datas as $form_data) {
|
||||
if ($form_data->type == "select") {
|
||||
$form_fields = explode(',', $form_data->value);
|
||||
$var = "";
|
||||
foreach ($form_fields as $form_field) {
|
||||
$var .= '<option value="' . $form_field . '">' . $form_field . '</option>';
|
||||
}
|
||||
echo '<label>' . ucfirst($form_data->label) . '</label><select class="form-control" name="' . $form_data->name . '">' . $var . '</select>';
|
||||
} elseif ($form_data->type == "radio") {
|
||||
$type2 = $form_data->value;
|
||||
$vals = explode(',', $type2);
|
||||
echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
|
||||
foreach ($vals as $val) {
|
||||
echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '"> ' . $val . ' ';
|
||||
}
|
||||
} elseif ($form_data->type == "textarea") {
|
||||
$type3 = $form_data->value;
|
||||
echo '<label>' . $form_data->label . '</label></br><textarea name="'.$form_data->name.'" class="form-control" style="height:15%;"></textarea>';
|
||||
} elseif ($form_data->type == "checkbox") {
|
||||
$type4 = $form_data->value;
|
||||
$checks = explode(',', $type4);
|
||||
echo '<br/><br/><label>' . ucfirst($form_data->label) . '</label><br/>';
|
||||
foreach ($checks as $check) {
|
||||
echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '">  ' . $check;
|
||||
}
|
||||
} else {
|
||||
echo '<label>' . ucfirst($form_data->label) . '</label><input type="' . $form_data->type . '" class="form-control" name="' . $form_data->name . '" />';
|
||||
$form = App\Http\Controllers\Admin\helpdesk\FormController::getForm($field);
|
||||
?>
|
||||
|
||||
{!! $form !!}
|
||||
|
||||
<!-- <script>
|
||||
$("[name='{{$field->name}}']").on('change', function () {
|
||||
var valueid = $("[name='{{$field->name}}']").val();
|
||||
alert(valueid);
|
||||
send(valueid);
|
||||
});
|
||||
function send(valueid) {
|
||||
$.ajax({
|
||||
url: "{{url('forms/render/child/'.$field->id)}}",
|
||||
dataType: "html",
|
||||
data: {'valueid': valueid},
|
||||
success: function (response) {
|
||||
$("#{{$field->name}}").html(response);
|
||||
},
|
||||
error: function (response) {
|
||||
$("#{{$field->name}}").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
?>
|
||||
</script>-->
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
@@ -0,0 +1,125 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
|
||||
<form action="{!!URL::route('priority.create1')!!}" method="post" role="form">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">{{Lang::get('lang.create')}}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_desc'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_desc', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_color'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_color', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!} <span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority" value="" >
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_desc') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_desc',Lang::get('lang.priority_desc')) !!}<span class="text-red"> *</span>
|
||||
<input type="text" name="priority_desc" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Priority Color -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_color') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_color',Lang::get('lang.priority_color')) !!}<span class="text-red"> *</span>
|
||||
<input class="form-control my-colorpicker1 colorpicker-element" id="colorpicker" type="text" name="priority_color">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="status" value="1" checked>{{Lang::get('lang.active')}}
|
||||
<input type="radio" name="status" value="0" >{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Show radio: required: public|private -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('ispublic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('ispublic',Lang::get('lang.visibility')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="ispublic" value="1" checked>public
|
||||
<input type="radio" name="ispublic" value="0" >private
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$("#colorpicker").colorpicker();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- close form -->
|
||||
{!! Form::close() !!}
|
||||
@stop
|
@@ -0,0 +1,133 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- open a form -->
|
||||
<form action="{!!URL::route('priority.edit1')!!}" method="post" role="form">
|
||||
<input type="hidden" name="priority_id" value="{{$tk_priority->priority_id}}">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">{{Lang::get('lang.edit')}}</h2>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(Session::has('errors'))
|
||||
<?php //dd($errors); ?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('priority'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_desc'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_desc', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('priority_color'))
|
||||
<li class="error-message-padding">{!! $errors->first('priority_color', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('status'))
|
||||
<li class="error-message-padding">{!! $errors->first('status', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('ispublic'))
|
||||
<li class="error-message-padding">{!! $errors->first('ispublic', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- Name text form Required -->
|
||||
<div class="box-body table-responsive no-padding"style="overflow:hidden;">
|
||||
<!-- <table class="table table-hover" style="overflow:hidden;"> -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority',Lang::get('lang.priority')) !!}<span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority" value="{{ ($tk_priority->priority) }}" >
|
||||
</div>
|
||||
</div>
|
||||
<!-- Grace Period text form Required -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_desc') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_desc',Lang::get('lang.priority_desc')) !!} <span class="text-red"> *</span>
|
||||
<input type="text" class="form-control" name="priority_desc" value="{{ ($tk_priority->priority_desc) }}">
|
||||
</div>
|
||||
</div></div>
|
||||
<!-- Priority Color -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group {{ $errors->has('priority_color') ? 'has-error' : '' }}">
|
||||
{!! Form::label('priority_color',Lang::get('lang.priority_color')) !!}<span class="text-red"> *</span>
|
||||
<input class="form-control my-colorpicker1 colorpicker-element" id="colorpicker" value="{{ ($tk_priority->priority_color) }}" type="text" name="priority_color">
|
||||
</div>
|
||||
</div>
|
||||
<!-- status radio: required: Active|Dissable -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
|
||||
{!! Form::label('status',Lang::get('lang.status')) !!}<span class="text-red"> *</span>
|
||||
<input type="radio" name="status" value="1" {{$tk_priority->status == '1' ? 'checked' : ''}}>{{Lang::get('lang.active')}}
|
||||
<input type="radio" name="status" value="0" {{$tk_priority->status == '0' ? 'checked' : ''}}>{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Show radio: required: public|private -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group {{ $errors->has('ispublic') ? 'has-error' : '' }}">
|
||||
{!! Form::label('visibility',Lang::get('lang.visibility')) !!} <span class="text-red"> *</span>
|
||||
<input type="radio" name="ispublic" value="1" {{$tk_priority->ispublic == '1' ? 'checked' : ''}} > {{Lang::get('lang.public')}}
|
||||
<input type="radio" name="ispublic" value="0" {{$tk_priority->ispublic == '0' ? 'checked' : ''}}>{{Lang::get('lang.private')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Admin Note : Textarea : -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('admin_note',Lang::get('lang.admin_notes')) !!}
|
||||
{!! Form::textarea('admin_note',null,['class' => 'form-control','size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="default_priority" @if($tk_priority->is_default == $tk_priority->priority_id) checked disabled @endif> {{ Lang::get('lang.make-default-priority')}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
</div>
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- close form -->
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$("#colorpicker").colorpicker();
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
@@ -0,0 +1,126 @@
|
||||
@extends('themes.default1.admin.layout.admin')
|
||||
|
||||
@section('Manage')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('manage-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('priority')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.ticket_priority') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</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>Fail!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!! Session::get('fails') !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<span class="lead border-right">{!! Lang::get('lang.priority') !!}</span>
|
||||
<div class="pull-right">
|
||||
<a href="{{route('priority.create')}}" class="btn btn-primary">{{Lang::get('lang.create_ticket_priority')}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-header with-border">
|
||||
<span class="lead border-right">{!! Lang::get('lang.user_priority_status') !!}</span>
|
||||
|
||||
|
||||
<div class="btn-group pull-right" id="toggle_event_editing">
|
||||
<button type="button" class="btn {{$user_status->status == '0' ? 'btn-info' : 'btn-default'}} locked_active">Inactive</button>
|
||||
<button type="button" class="btn {{$user_status->status == '1' ? 'btn-info' : 'btn-default'}} unlocked_inactive">Active</button>
|
||||
</div>
|
||||
<!-- <div class="alert alert-info" id="switch_status"></div> -->
|
||||
|
||||
<!-- <a href="{{route('priority.create')}}" class="btn btn-primary">{{Lang::get('lang.create_ticket_priority')}}</a> -->
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.priority_desc'),
|
||||
Lang::get('lang.priority_color'),
|
||||
Lang::get('lang.status'),
|
||||
Lang::get('lang.action'))
|
||||
->setUrl(route('priority.index1')) // this is the route where data will be retrieved
|
||||
->render() !!}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function confirmDelete(priority_id) {
|
||||
var r = confirm('Are you sure?');
|
||||
if (r == true) {
|
||||
// alert('{!! url("ticket_priority") !!}/' + priority_id + '/destroy');
|
||||
window.location = '{!! url("ticket_priority") !!}/' + priority_id + '/destroy';
|
||||
// $url('ticket_priority/' . $model->priority_id . '/destroy')
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$('#toggle_event_editing button').click(function () {
|
||||
|
||||
var user_settings_priority=1;
|
||||
var user_settings_priority=0;
|
||||
if ($(this).hasClass('locked_active') ) {
|
||||
|
||||
|
||||
user_settings_priority = 0
|
||||
} if ( $(this).hasClass('unlocked_inactive')) {
|
||||
|
||||
user_settings_priority = 1;
|
||||
}
|
||||
|
||||
/* reverse locking status */
|
||||
$('#toggle_event_editing button').eq(0).toggleClass('locked_inactive locked_active btn-default btn-info');
|
||||
$('#toggle_event_editing button').eq(1).toggleClass('unlocked_inactive unlocked_active btn-info btn-default');
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '{{route("user.priority.index")}}',
|
||||
data: {user_settings_priority: user_settings_priority},
|
||||
success: function (result) {
|
||||
// with('success', Lang::get('lang.approval_settings-created-successfully'));
|
||||
// alert("Hi, testing");
|
||||
alert(result);
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
@@ -136,7 +136,6 @@ class="active"
|
||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||
<option value="email">{!! Lang::get('lang.email') !!}</option>
|
||||
<option value="email_name">{!! Lang::get('lang.email_name') !!}</option>
|
||||
<option value="email_to">{!! Lang::get('lang.email_to') !!}</option>
|
||||
<option value="subject">{!! Lang::get('lang.subject') !!}</option>
|
||||
<option value="message">{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
||||
</select>
|
||||
|
@@ -179,11 +179,6 @@ class="active"
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email_name') !!}</option>
|
||||
<option value="email_to" <?php
|
||||
if ($workflow_rule->matching_scenario == 'email_to') {
|
||||
echo "selected='selected'";
|
||||
}
|
||||
?> >{!! Lang::get('lang.email_to') !!}</option>
|
||||
<option value="subject" <?php
|
||||
if ($workflow_rule->matching_scenario == 'subject') {
|
||||
echo "selected='selected'";
|
||||
|
@@ -70,11 +70,6 @@ class="active"
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<script>
|
||||
function confirm_delete() {
|
||||
return confirm('are you sure?');
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#example1").DataTable();
|
||||
$('#example2').DataTable({
|
||||
@@ -86,6 +81,5 @@ class="active"
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
Reference in New Issue
Block a user