import some basic types
This commit is contained in:
parent
a21de65eb4
commit
2132db1709
4
crm/types/bool.ejs
Normal file
4
crm/types/bool.ejs
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="form-check form-check-inline">
|
||||
<label class="form-check-label"><input class="form-check-input" type="radio" name="{name}" value="1" {if value==1}checked="checked"{/if}/> Yes</label>
|
||||
<label class="form-check-label"><input class="form-check-input" type="radio" name="{name}" value="0" {if value!=1}checked="checked"{/if}/> No</label>
|
||||
</div>
|
||||
3
crm/types/bool.json
Normal file
3
crm/types/bool.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "Boolean value (yes/no)"
|
||||
}
|
||||
3
crm/types/bool_multi.ejs
Normal file
3
crm/types/bool_multi.ejs
Normal file
@ -0,0 +1,3 @@
|
||||
{foreach values as key => val}
|
||||
<input type="checkbox" name="{name}[]" value="{key}" {if jQuery.inArray(key, value) >= 0} checked="checked"{/if}> {val}
|
||||
{/foreach}
|
||||
3
crm/types/bool_multi.json
Normal file
3
crm/types/bool_multi.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "Boolean value (multiple checkboxes)"
|
||||
}
|
||||
7
crm/types/enum.ejs
Normal file
7
crm/types/enum.ejs
Normal file
@ -0,0 +1,7 @@
|
||||
<select name="{name}" class="form-control form-control-sm">
|
||||
<% for (var key in values) {
|
||||
var val = values[key];
|
||||
%>
|
||||
<option value="{key}"{if value == key} selected="selected"{/if}>{val}</option>
|
||||
<% } %>
|
||||
</select>
|
||||
3
crm/types/enum.json
Normal file
3
crm/types/enum.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "ENUM (single option)"
|
||||
}
|
||||
1
crm/types/input.ejs
Normal file
1
crm/types/input.ejs
Normal file
@ -0,0 +1 @@
|
||||
<input type="{type}" id="{name}" name="{name}" value="{value}" class="form-control form-control-sm" placeholder="{title}" autocomplete="off"/>
|
||||
9
crm/types/input.json
Normal file
9
crm/types/input.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "Text input",
|
||||
"options": {
|
||||
"type": {
|
||||
"title": "Input type",
|
||||
"values": ["hidden", "text", "password", "email"]
|
||||
}
|
||||
}
|
||||
}
|
||||
10
crm/types/stamp.ejs
Normal file
10
crm/types/stamp.ejs
Normal file
@ -0,0 +1,10 @@
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" name="{name}" value="{value}" id="{name}" class="form-control tac"/>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar-plus-o" aria-hidden="true" onClick="return showCalendar('{name}', '%Y-%m-%d %H:%M:%S',true,true);"></i>
|
||||
|
||||
<i class="fa fa-clock-o hand" aria-hidden="true" onClick="var xx=new Date; $('#{name}').val(xx.toISOString().replace('T', ' ').split('.')[0]); return false;"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
crm/types/stamp.json
Normal file
3
crm/types/stamp.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "Date/time input field"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user