How to add 2 column in magento 2 page - magento

I want to add responsive 2 or 3 bootstarp column in Magento 2 static block using simple html,css code.I use Magento2 FreeGo theme. when i link bootstrap file in conflict the layout.Please give me best solution.
I want use following simple code Form Ui in Magento static block.
<div class="container">
<div class="row" style="border: 1px; border-style: solid; padding: 20px;
background-color: #f5f5f5;
border-color: #dedede;">
<div class="col-sm-6">
<h3>Acrylic</h3>
<div class="form-group">
Material
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="form-group">
Thickness in mm
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="form-group">
Type
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div style="margin-bottom: 30px; margin-top: 30px;">
Product
<input type="file" class="form-control-file" id="">
</div>
<div>
<button type="submit" class="btn btn-info">Add to Cart</button>
<button type="submit" class="btn btn-info">Close</button>
</div>
</div>
<div class="col-sm-6">
<h3>Product</h3>
<img src="http://thecuttingcenter.com/staging/pub/media/wysiwyg/home/blog-
1.png" class="img-responsive">
</div>
</div>
</div>

This is it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="style.css">
<title>Title</title>
<style>
.a {
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
.b {
border: 1px;
border-style: solid;
padding: 20px;
background-color: #f5f5f5;
border-color: #dedede;
}
</style>
</head>
<body>
<div>
<div class="a">
<div class="b">
<h3>Acrylic</h3>
<div>
Material
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="form-group">
Thickness in mm
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div class="form-group">
Type
<select class="form-control" id="sel1">
<option>Choose an Option...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<div>
Product
<input type="file" class="form-control-file" id="">
</div>
<div>
<button type="submit" class="btn btn-info">Add to Cart</button>
<button type="submit" class="btn btn-info">Close</button>
</div>
</div>
<div class="b">
<h3>Product</h3>
<img src="http://thecuttingcenter.com/staging/pub/media/wysiwyg/home/blog-
1.png" class="img-responsive">
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>
https://jsfiddle.net/sugandhnikhil/9nu5j103/

Related

Is it possible to generate PDF using dompdf from form data before submitting the form to database in laravel?

Applogies for the question again. I'm new to laravel and this is my first project.
I'm trying to generate a pdf using DomPDF but before submitting my form to database, I dont know whether it is possible or not.
this is my create.blade.php code
#extends('layouts.main')
#section('content')
<!-- Page Heading -->
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Orders</h1>
</div>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-12">
<div>
<div class="card-header">{{ __('Creating Order') }}
Back
</div>
<div>
<form method="GET" action="{{ route('orders.create') }}" enctype="multipart/form-data">
#csrf
<div class="form-row align-items-center">
<div class="form-group col-md-6 col-lg-5">
<select id="customer_name" onchange="this.form.submit()" type="search" name="customer_id" class="form-control #error('customer_id') is-invalid #enderror" value="{{ old('customer_id') }}" required >
<option selected></option>
#foreach ($customers as $customer)
<option value="{{ $customer->id }}">{{ $customer->customer_name }}</option>
#endforeach
</select>
#error('customer_id')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
<div class="col-auto">
<input id="btn" type="button" class="btn btn-primary mb-3" value="Show Catalog" onclick="showDiv()">
</div>
</div>
<div class="m-3">
Displaying Catalog for: <strong> <span style="color: red" id="customerName"></span><span style="color: red">. {{$count_linkeds}}</span></strong> items found in this Catalog.
</div>
</form>
<form method="POST" action="{{ route('orders.store') }}" enctype="multipart/form-data">
#csrf
<main id="catalog" style="display: none" class="main">
<div class="container">
<div class="row s6 m3">
#foreach($linkeds as $lnkditem)
<div class="col s6 m3">
<div class="card item-images">
<div class="img-wrapper">
<img src="{{ asset('uploads/linkedItems/'.$lnkditem->item_image) }}" width= '50' height='50' class="img img-responsive" />
</div>
<div class="card-content mt-2 item">
<h6 style="font-size: 18px">
Product Name: <strong style="color: red">{{ $lnkditem->product->product_name}}</strong>
</h6>
<div style="float: right; margin-top: -30px">
<label hidden style="float: right;" for="linked_id">{{ __(': Linked ID') }}</label>
<textarea hidden style="text-align: center; resize: none; width:100px; height: 28px; overflow:hidden; border:none; background-color: #f8f8f8;" readonly rows="1" name="linked_id" id="linked_id" class="form-control"
value="{{ old('linked_id', $lnkditem->id) }}">{{ $lnkditem->id}}</textarea>
</div>
<p>
Product description: <strong style="color: red"> {{ $lnkditem->product->product_description}}</strong>
</p>
Item Name: <span readonly id="item_name" name="item_name" style="font-weight: bold; color: black" value="{{ $lnkditem->item->item_name}}">{{ $lnkditem->item->item_name}}</span>
<p>
Item description: <strong style="color: black"> {{ $lnkditem->item->item_description}}</strong>
</p>
<p>
Supplier Ref.: <strong style="color: black"> {{ $lnkditem->supplier_ref_no}}</strong>
</p>
<p>
Supplier Barcode: <strong style="color: black"> {{ $lnkditem->supplier_barcode}}</strong>
</p>
<div class="pass-quantity col-lg-3 col-md-4 col-sm-3 pl-0">
<label for="item_quantity" class="pass-quantity">Quantity:</label>
<input style="color: red" name="item_quantity" class="form-control" type="number" value="0" min="0">
</div>
<div>
<label for="pass-quantity" class="pass-quantity" style="color: red; font-weight: bold; float: right; margin-right: 45px !important; margin-top: -32px">Item Price: AED - </label>
<p type="number" name="item_cost" class="item_cost" style="color: red; font-weight: bold; float: right; margin-top: -32px">
{{ $lnkditem->item_cost}}
</p>
</div>
<div class="product-price d-none">{{ $lnkditem->item_cost}}</div>
<hr class="sidebar-divider">
<strong style="color: red"><p>Total Amount: AED:</p></strong>
<div class="product-line-price pt-4 pb-4 text-uppercase" style="color: red; font-weight: bold; float: right; margin-top: -67px">
<strong><span style="color: red" type="number" class="product-line-price">0.00</span></strong>
</div>
</div>
</div>
</div>
#endforeach
</div>
</div>
<div class="card card-action mb-3 pt-4" style="padding: 15px; height: 100%; width: 50%; margin-left: 25%">
<div class="mb-3" style="margin-left: 15px">
<label for="order_unq_id"></label>
Order UID: <textarea name="order_unq_id" style="color: red; font-weight: bold; width: 350px; resize: none; margin-left: 22%; margin-top: -31px !important; height: 38px; overflow:hidden; border:none; background-color: #f8f8f8;" readonly rows="1" id="order_unq_id" class="form-control #error('order_unq_id') is-invalid #enderror" value="{{ old('order_unq_id') }}">
</textarea>
</div>
<div style="margin-left: 20px">
Saving Order for - <strong> <span class="text-uppercase" style="color: red" id="order_save_customerName"></span></strong>
<input type="text" class="customerName_order_save_input" hidden id="customerName_order_save_input" value="">
</div><br>
<div class="col-xl-12 col-lg-4 col-md-5 totals">
<div class="border border-gainsboro mb-3 px-3">
<div class="border-bottom border-gainsboro">
<p class="text-uppercase mb-0 py-3 bg-primary text-white text-center"><strong>Order Summary</strong></p>
</div>
<p class="mt-3 text-uppercase">Subtotal AED:</p>
<div class="totals-item d-flex align-items-center justify-content-between"
style="float: right; margin-top: -40px">
<p class="totals-value" id="cart-subtotal"></p>
</div>
<div class="totals-item d-flex align-items-center justify-content-between">
<p class="text-uppercase">Aprox. VAT #5%</p>
<p class="totals-value tax" id="cart-tax"></p>
</div>
<div class="totals-item totals-item-total d-flex align-items-center justify-content-between mt-3 pt-3 border-top border-gainsboro">
<label for="total" class="text-uppercase" style="color: red;"><strong>grand Total</strong></label>
<input type="text" class="total_input" hidden id="total_input" name="total_input" value="0.00">
<textarea style="self-align: center; text-align: right; color: red; padding-top !important; 10px; resize: none; width:100px; height: 35px; overflow:hidden; border:none; background-color: white; font-size: 18px" readonly rows="1"
class="totals-value font-weight-bold cart-total" name="total" id="total" style="color: red;"></textarea>
</div>
</div>
</div>
<div>
<a type="submit" target="_blank" class="btn btn-success" href="{{route('mht_order_pdf')}}">Generate PDF</a>
</div>
<button type="submit" class="btn btn-primary" id="save_order" >Save Order</button>
</div>
</main>
</form>
</div>
</div>
</div>
</div>
</div>
#endsection
I dont want pdf to get data from database. I need to generate the pdf with form data before form gets submit to database. Is this possible to achive? Thank you in advance.
In terms of tecnicality, this is possible. Personally I've done something like this, only that the PDF is being generated after the form is stored to DB, but before the request is sent back to users.
So in the controller, you can do something like this:
// first validate request inputs..
// then generate the PDF
PDF::generate('order_pdf'); // or something, idk what's the actual syntax
// finally
return view('order_dashboard');
However you need to know that while the PDF::generate() line is being executed, the app will wait until it finished before moving to the next line, meaning that the execution is being done synchronously. Thus if the PDF generation takes too long, user will have to wait for it. To face this issue, you might want to look at Laravel's Queue so that the PDF generation can be executed asynchronously.

Why is blade file not show anything although code are correct in laravel 8

I installed Laravel 8 and set up a blade file.
I moved resources folders css, js, and bootstrap files to public folder and loaded from blade file.
This is master.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="{{asset('css/app.css')}}" rel="stylesheet" type="text/css"/>
<script src="{{asset('js/app.js')}}"><script/>
<script src="{{asset('js/bootstrap.js')}}"><script/>
</head>
<body>
#yield('content')
</body>
</html>
This is welcome.blade.php
#extends('layouts.master')
#section('content')
<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Sign In</div>
<div style="float:right; font-size: 80%; position: relative; top:-10px">Forgot password?</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form id="loginform" class="form-horizontal" role="form">
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="login-username" type="text" class="form-control" name="username" value="" placeholder="username or email">
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="login-password" type="password" class="form-control" name="password" placeholder="password">
</div>
<div class="input-group">
<div class="checkbox">
<label>
<input id="login-remember" type="checkbox" name="remember" value="1"> Remember me
</label>
</div>
</div>
<div style="margin-top:10px" class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<a id="btn-login" href="#" class="btn btn-success">Login </a>
<a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>
</div>
</div>
<div class="form-group">
<div class="col-md-12 control">
<div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
Don't have an account!
<a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show()">
Sign Up Here
</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="signupbox" style="display:none; margin-top:50px" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">Sign Up</div>
<div style="float:right; font-size: 85%; position: relative; top:-10px"><a id="signinlink" href="#" onclick="$('#signupbox').hide(); $('#loginbox').show()">Sign In</a></div>
</div>
<div class="panel-body" >
<form id="signupform" class="form-horizontal" role="form">
<div id="signupalert" style="display:none" class="alert alert-danger">
<p>Error:</p>
<span></span>
</div>
<div class="form-group">
<label for="email" class="col-md-3 control-label">Email</label>
<div class="col-md-9">
<input type="text" class="form-control" name="email" placeholder="Email Address">
</div>
</div>
<div class="form-group">
<label for="firstname" class="col-md-3 control-label">First Name</label>
<div class="col-md-9">
<input type="text" class="form-control" name="firstname" placeholder="First Name">
</div>
</div>
<div class="form-group">
<label for="lastname" class="col-md-3 control-label">Last Name</label>
<div class="col-md-9">
<input type="text" class="form-control" name="lastname" placeholder="Last Name">
</div>
</div>
<div class="form-group">
<label for="password" class="col-md-3 control-label">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" name="passwd" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="icode" class="col-md-3 control-label">Invitation Code</label>
<div class="col-md-9">
<input type="text" class="form-control" name="icode" placeholder="">
</div>
</div>
<div class="form-group">
<!-- Button -->
<div class="col-md-offset-3 col-md-9">
<button id="btn-signup" type="button" class="btn btn-info"><i class="icon-hand-right"></i> &nbsp Sign Up</button>
<span style="margin-left:8px;">or</span>
</div>
</div>
<div style="border-top: 1px solid #999; padding-top:20px" class="form-group">
<div class="col-md-offset-3 col-md-9">
<button id="btn-fbsignup" type="button" class="btn btn-primary"><i class="icon-facebook"></i>   Sign Up with Facebook</button>
</div>
</div>
</form>
</div>
</div>
</div>
#endsection
route is default
Route::get('/', function () {
return view('welcome');
});
Console is not showing any errors and view is not showing anything.
Although the blade files are coded correctly, it is not working
when I remove asset files from , it show view .
So what wrong in asset file
Can someone explain this to me?

Form POST request does not submit to controller but GET request works fine

I'm trying to submit a POST request to a controller but controller does not respond to my request and no error has been thrown as well, however GET request works fine.
I'm using
<button type="submit" class="btn btn-primary">Submit</button>
to send my request at the controller and this the controller that will handle my request>>
#GetMapping("/flexfieldkeysegment/{keyFlexFieldSegmentId}")
public String editCategoryForm(#PathVariable Integer keyFlexFieldSegmentId, Model model) {
String tenantName=getCurrentTenant().getUser().getTenantName();
FlexFieldKeySegment segment = keySegment.findFlexFieldKeySegmentById(tenantName, keyFlexFieldSegmentId);
model.addAttribute("keySegment",segment);
return viewPrefix+"edit_flexfield_key_segment";
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorate="~{layout}">
<body>
<div layout:fragment="content">
<br /> <br /> <br />
<div class="col-md-6 col-md-offset-3">
<h3 class="sub-title theme-font"></h3>
<div class="panel panel-primary theme-font">
<div class="panel-heading">
<h3 class="panel-title">Accounting Flexfield Key Segment</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<form th:action="#{/flexfieldkeysegment/{keyFlexFieldSegmentId}(keyFlexFieldSegmentId=${keySegment.keyFlexFieldSegmentId})}"
th:object="${keySegment}" method="post"
enctype="multipart/form-data">
<p th:if="${#fields.hasErrors('global')}" th:errors="*{global}"
th:class="text-red">Incorrect data</p>
<!-- text input -->
<div class="form-group"
th:classappend="${#fields.hasErrors('keyFlexFieldSegmentCode')}? 'has-error'">
<label>Flexfield Segment Code <span style="color: red;">*</span></label>
<input type="text" class="form-control"
name="keyFlexFieldSegmentCode"
th:field="*{keyFlexFieldSegmentCode}"
placeholder="Enter Flexfield Key Segment Code" />
<p th:if="${#fields.hasErrors('keyFlexFieldSegmentCode')}"
th:errors="*{keyFlexFieldSegmentCode}" th:class="text-red">Incorrect
data</p>
</div>
<div class="form-group"
th:classappend="${#fields.hasErrors('name')}? 'has-error'">
<label>Flexfield Key Segment Name<span
style="color: red;">*</span></label> <input type="text"
class="form-control" name="name" th:field="*{name}"
placeholder="Enter Flexfield Key Segment Name" />
<p th:if="${#fields.hasErrors('name')}" th:errors="*{name}"
th:class="text-red">Incorrect data</p>
</div>
<div class="form-group"
th:classappend="${#fields.hasErrors('description')}? 'has-error'">
<label>Description<span style="color: red;">*</span></label> <input
type="text" class="form-control" name="description"
th:field="*{description}"
placeholder="Enter Flexfield Key Segment Description" />
<p th:if="${#fields.hasErrors('description')}"
th:errors="*{description}" th:class="text-red">Incorrect
data</p>
</div>
<div class="form-group"
th:classappend="${#fields.hasErrors('separatorId')}? 'has-error'">
<label for="segment_separator">Segment Separator <span
style="color: red;">*</span></label> <select name="name"
id="separator" th:field="*{separatorId}"
th:data-validation-message="#{msg.flexfieldkeysegment.separator.mandatory}"
class="form-control dropdown">
<option th:value="''" th:text="'Select'"></option>
<option th:each="separator : ${segment_separator}"
th:text="${separator.separatorName}"
th:value="${separator.separatorId}"></option>
</select>
<p th:if="${#fields.hasErrors('separatorId')}"
th:errors="*{separatorId}" th:class="text-red">Incorrect
data</p>
</div>
<div class="form-group">
<div style="width: 30%; float: left; margin-right: 3%;">
<input type="checkbox" th:field="*{freezeFlexfieldDefinition}"
th:value="${freezeFlexfieldDefinition}" /> <label>Freeze
Flexfield Definition</label>
</div>
<div style="width: 30%; float: left; margin-right: 3%;">
<input type="checkbox" th:field="*{crossValidateSegment}"
th:value="${crossValidateSegment}" /> <label>Cross
Validate Segment</label>
</div>
<div style="width: 30%; float: left; margin-right: 3%;">
<input type="checkbox" th:field="*{freezeRollUpGroup}"
th:value="${freezeRollUpGroup}" /> <label>Freeze
Rollup Group</label>
</div>
<div style="width: 30%; float: left; margin-right: 3%;">
<input type="checkbox" th:field="*{allowDynamicInsert}"
th:value="${allowDynamicInsert}" /> <label>Allow
Dynamic Insert</label>
</div>
<div style="width: 30%; float: left; margin-right: 3%;">
<input type="checkbox" th:field="*{active}"
th:value="${active}" /> <label>Active</label>
</div>
</div>
</form>
</div>
</div>
<div class="box-footer">
<button type="button" class="btn btn-warning"
onclick="window.history.go(-1); return false;">
<span class="glyphicon glyphicon-arrow-left"></span> Back
</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Instead of #GetMapping, use #PostMapping. Also, annotate the 'Model' POJO with #RequestBody
#PostMapping("/flexfieldkeysegment/{keyFlexFieldSegmentId}")
public String editCategoryForm(#PathVariable Integer keyFlexFieldSegmentId, #RequestBody Model model) {
String tenantName=getCurrentTenant().getUser().getTenantName();
FlexFieldKeySegment segment = keySegment.findFlexFieldKeySegmentById(tenantName, keyFlexFieldSegmentId);
model.addAttribute("keySegment",segment);
return viewPrefix+"edit_flexfield_key_segment";
}

Dynamic Form Fields on Table using thymeleaf and Spring Boot

I am trying to create rows dynamically in a table using thymeleaf and spring boot.
I've looked at following urls but couldn't make it working for me.
http://forum.thymeleaf.org/I-have-problem-in-binding-the-list-of-objects-contained-inside-a-object-on-the-form-using-thymeleaf-td3525038.html#a3526497
http://stingh711.github.io/dynamic-form-with-springmvc-and-thymeleaf.html
when I click on the addCourse button, its not even going to StudentController.
please can someone help?
Student.html
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="layout">
<head>
<title>Students</title>
</head>
<body>
<div layout:fragment="content">
<form th:object="${student}" th:action="#{/student/create}" action="#" method="post">
<div class="row">
<div class="col-md-offset-3 col-md-6">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">Add New Student</h3>
</div>
<div class="panel-body">
<input type="text" th:field="*{studentId}" class="form-control" placeholder="Student Id" />
<div style="clear: both; display: block; height: 10px;"></div>
<input type="text" th:field="*{firstName}" class="form-control" placeholder="First Name" />
<div style="clear: both; display: block; height: 10px;"></div>
<input type="text" th:field="*{lastName}" class="form-control" placeholder="Last Name" />
<div style="clear: both; display: block; height: 10px;"></div>
<input type="text" th:field="*{city}" class="form-control" placeholder="City" />
<div style="clear: both; display: block; height: 10px;"></div>
<input type="submit" class="btn btn-success pull-right"
value="Save">
</div>
</div>
</div>
</div>
<!-- start of detail section -->
<div class="row" style="margin-bottom: 50px;">
<div class="col-md-offset-2 col-md-8">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">Student Courses</h3>
</div>
<div class="panel-body">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr class="btn-success">
<th>Course</th>
<th>End Date</th>
</tr>
</thead>
<tbody>
<tr th:each="studentCourse, rowStat : *{studentCourses}">
<td></td>
<td><input type="text" class="form-control" th:field="*{studentCourses[__${rowStat.index}__].courseId}" placeholder="Course" /></td>
<td><input type="text" class="form-control" th:field="*{studentCourses[__${rowStat.index}__].endDate}" placeholder="End Date"/>
<span class="col-sm-1 row-delete-button">
<button class="btn btn-default" th:value="*{studentCourses[__${rowStat.index}__].studentCourseId}" name="removeStudentCourse">
<i class="glyphicon glyphicon-trash icon-white"></i>
</button>
</span>
</tr>
</tbody>
</table>
<button class="btn btn-success btn-add" type="submit" name="addCourse">
<i class="glyphicon glyphicon-plus gs"></i> <b> Add</b>
</button>
</div>
</div>
</div>
<!-- end of detail -->
</form>
</div>
</body>
</html>
StudentController
#RequestMapping(value="/Student", params = {"addCourse"})
public String addCourse(Student student, BindingResult result) {
System.out.println("add new course");
student.getCourseList().add(new StudentCourse());
return "Student";
}
js.html (locatated # templates/fragments)
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<script th:src="#{/webjars/jquery/2.1.4/jquery.min.js}"></script>
style.html (locatated # templates/fragments)
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<link rel="stylesheet" th:href="#{/webjars/bootstrap/3.3.4/css/bootstrap.min.css}" />

fineuploader demo i reacreated but does not show on browser

hello i checked http://fineuploader.com/demos.html
and in 'Manually Trigger Uploads & Edit File Names'
i tried the code and recreate it on my pc
but i don't see anything in browser, just blank
here's the code(all the code in one html file only, github just cut the code here):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQuery
====================================================================== -->
<script src="js/jquery.min.js"></script>
<!-- Fine Uploader New/Modern CSS file
====================================================================== -->
<link href="css/fine-uploader-new.min.css" rel="stylesheet">
<!-- Fine Uploader jQuery JS file
====================================================================== -->
<script src="js/jquery.fine-uploader.min.js"></script>
<!-- Fine Uploader Thumbnails template w/ customization
====================================================================== -->
<script type="text/template" id="qq-template-manual-trigger">
<div class="qq-uploader-selector qq-uploader" qq-drop-area-text="Drop files here">
<div class="qq-total-progress-bar-container-selector qq-total-progress-bar-container">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-total-progress-bar-selector qq-progress-bar qq-total-progress-bar"></div>
</div>
<div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
<span class="qq-upload-drop-area-text-selector"></span>
</div>
<div class="buttons">
<div class="qq-upload-button-selector qq-upload-button">
<div>Select files</div>
</div>
<button type="button" id="trigger-upload" class="btn btn-primary">
<i class="icon-upload icon-white"></i> Upload
</button>
</div>
<span class="qq-drop-processing-selector qq-drop-processing">
<span>Processing dropped files...</span>
<span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
</span>
<ul class="qq-upload-list-selector qq-upload-list" aria-live="polite" aria-relevant="additions removals">
<li>
<div class="qq-progress-bar-container-selector">
<div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"></div>
</div>
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
<img class="qq-thumbnail-selector" qq-max-size="100" qq-server-scale>
<span class="qq-upload-file-selector qq-upload-file"></span>
<span class="qq-edit-filename-icon-selector qq-edit-filename-icon" aria-label="Edit filename"></span>
<input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
<span class="qq-upload-size-selector qq-upload-size"></span>
<button type="button" class="qq-btn qq-upload-cancel-selector qq-upload-cancel">Cancel</button>
<button type="button" class="qq-btn qq-upload-retry-selector qq-upload-retry">Retry</button>
<button type="button" class="qq-btn qq-upload-delete-selector qq-upload-delete">Delete</button>
<span role="status" class="qq-upload-status-text-selector qq-upload-status-text"></span>
</li>
</ul>
<dialog class="qq-alert-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Close</button>
</div>
</dialog>
<dialog class="qq-confirm-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">No</button>
<button type="button" class="qq-ok-button-selector">Yes</button>
</div>
</dialog>
<dialog class="qq-prompt-dialog-selector">
<div class="qq-dialog-message-selector"></div>
<input type="text">
<div class="qq-dialog-buttons">
<button type="button" class="qq-cancel-button-selector">Cancel</button>
<button type="button" class="qq-ok-button-selector">Ok</button>
</div>
</dialog>
</div>
</script>
<style>
#trigger-upload {
color: white;
background-color: #00ABC7;
font-size: 14px;
padding: 7px 20px;
background-image: none;
}
#fine-uploader-manual-trigger .qq-upload-button {
margin-right: 15px;
}
#fine-uploader-manual-trigger .buttons {
width: 36%;
}
#fine-uploader-manual-trigger .qq-uploader .qq-total-progress-bar-container {
width: 60%;
}
</style>
<title>Fine Uploader Manual Upload Trigger Demo</title>
<!-- Fine Uploader DOM Element
====================================================================== -->
<!-- Your code to create an instance of Fine Uploader and bind to the DOM/template
====================================================================== -->
<script>
$('#fine-uploader-manual-trigger').fineUploader({
template: 'qq-template-manual-trigger',
request: {
endpoint: '/server/uploads'
},
thumbnails: {
placeholders: {
waitingPath: '/source/placeholders/waiting-generic.png',
notAvailablePath: '/source/placeholders/not_available-generic.png'
}
},
autoUpload: false
});
$('#trigger-upload').click(function() {
$('#fine-uploader-manual-trigger).fineUploader('uploadStoredFiles');
});
</script>
</body>
</html>
i also have the js and css in the folders
how to make this work??? thanks

Resources