Fixing several bugs and adding very basic rule support
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>{{title}}</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme/out/base.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme@1.2.6/out/light.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme/out/light.css">
|
||||
|
||||
<style>
|
||||
#message {
|
||||
@ -29,24 +29,24 @@
|
||||
<div id="message"> </div>
|
||||
<form id="f1" action="JavaScript:void(null)">
|
||||
{{#each fields}}
|
||||
<div class="input-group">
|
||||
<label>{{label}}</label>
|
||||
{{#ifCond type "===" "text"}}
|
||||
<input type="text" placeholder="{{label}}" name="{{name}}" value="{{value}}" />
|
||||
{{/ifCond}}
|
||||
<div class="input-group">
|
||||
<label>{{label}}</label>
|
||||
{{#ifCond type "===" "text"}}
|
||||
<input type="text" placeholder="{{label}}" name="{{name}}" value="{{value}}" />
|
||||
{{/ifCond}}
|
||||
|
||||
{{#ifCond type "===" "number"}}
|
||||
<input type="number" placeholder="{{label}}" name="{{name}}" value="{{value}}" />
|
||||
{{/ifCond}}
|
||||
{{#ifCond type "===" "number"}}
|
||||
<input type="number" placeholder="{{label}}" name="{{name}}" value="{{value}}" />
|
||||
{{/ifCond}}
|
||||
|
||||
{{#ifCond type "===" "boolean"}}
|
||||
<input type="checkbox" name="{{name}}" checked="{{value}}" />
|
||||
{{/ifCond}}
|
||||
{{#ifCond type "===" "boolean"}}
|
||||
<input type="checkbox" name="{{name}}" checked="{{value}}" />
|
||||
{{/ifCond}}
|
||||
|
||||
{{#ifCond type "===" "textarea"}}
|
||||
<textarea class="inp" name="{{name}}" rows="20">{{value}}</textarea>
|
||||
{{/ifCond}}
|
||||
</div>
|
||||
{{#ifCond type "===" "textarea"}}
|
||||
<textarea class="inp" name="{{name}}" rows="20">{{value}}</textarea>
|
||||
{{/ifCond}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<button class="btn btn-primary" onclick="submitData()">Submit</button>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>{{title}}</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme/out/base.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme@1.2.6/out/light.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@hibas123/theme/out/light.css">
|
||||
|
||||
<style>
|
||||
table {
|
||||
@ -37,18 +37,18 @@
|
||||
<div class="margin" style="margin-top: 4rem;">
|
||||
<h1>{{title}}</h1>
|
||||
{{#if empty}}
|
||||
<h3>No Data available!</h3>
|
||||
<h3>No Data available!</h3>
|
||||
{{else}}
|
||||
|
||||
<table style="overflow-x: auto">
|
||||
{{#each table as |row|}}
|
||||
<tr>
|
||||
{{#each row as |col|}}
|
||||
<td>{{col}}</td>
|
||||
<table style="overflow-x: auto">
|
||||
{{#each table as |row|}}
|
||||
<tr>
|
||||
{{#each row as |col|}}
|
||||
<td>{{col}}</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</table>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user