@extends('main_layouts.admin_template')
@section('content')
    <div class="content-wrapper" style="min-height: 916px;">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                Adding of Print Template
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{ url('/admin') }}"><i class="fa fa-dashboard"></i> Home</a></li>
                <li class="active">Adding of Print Template</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="box box-custom-color" style="min-height:450px;">
                <div class="box-body">
                    <div class="row">
                        <div class="col-sm-12">
                            <div id="savePrintTemplateMsg"></div>
                        </div>
                        <form class="form-horizontal" id="frmAddPrintTemplate"  enctype="multipart/form-data">
                            <div class="col-lg-12 col-sm-12">
        						<h3>Print Template Information</h3>
        						<hr>
        					</div>
                            <input type="hidden" name="templatecode" value="{{ $templatecode }}">
        					<div class="col-lg-6 col-sm-6">
                                <div class="box-body">
                                    <div class="form-group">
                                        <label  class="col-sm-4 control-label">Sports Name</label>
                                        <div class="col-sm-8">
                                            <select class="form-control" name="templateType">
                                                <option value="JERSEY">Jersey</option>
                                                <option value="SHORTS">Shorts</option>
                                            </select>
                                            <span id="err-sportsname" style="color: #dd4b39"></span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label  class="col-sm-4 control-label">Generated URL</label>
                                        <div class="col-sm-8">
                                            <select class="form-control" name="templateSize">
                                                @foreach($sizeslist as $row){
                                                    <option value="{{ $row->Size }}">{{ $row->Size }}</option>
                                                }
                                                @endforeach
                                            </select>
                                            <span id="err-generatedUrl" style="color: #dd4b39"></span>
                                        </div>
                                    </div>
     							 </div>
                                  <!-- /.box-body -->
                            </div>
    						<div class="col-lg-6 col-sm-6">
                                <div class="box-body">
                                    <div class="form-group">

                                        <div class="col-sm-12">
                                            <label  class="control-label" >Add Image <small id="label-suggest-upload">(pixel 300px x 300px)</small></label>
                                            <br><br>
                                            <img id="prev-print-template" src="{{url('public/images/no-image.jpg')}}" class="img img-responsive" alt="Preview Image" />
                                        </div>
                                    </div>
        							<div class="form-group">
        								<div class="col-sm-8">
        									<input name="preview_print_template" id="preview_print_template" class="form-control" type="file" onchange="loadPrintTemplate(this);" data-error="#err-previewImg" />
                                            <span id="err-previewImg" style="color: #dd4b39"></span>
        								</div>
        								<div class="col-sm-4">
        									<button type="button" onclick="clearImg();" class="btn btn-default btn-block">Clear</button>
        								</div>
        							</div>
     							 </div>
    						</div>

                            <div class="col-sm-12">
                                <hr>
                                <a href="{{ url('admin/templates/edit') . '/' . $templatecode }}"  class="btn btn-default">Back</a>
                                <button type="submit" id="savePrintTempBtn" class="btn btn-primary">Save</button>
                            </div>
						</form>
                    </div>
                </div>
            </div>
        </section>
    </div>
@endsection
