UI fixes
This commit is contained in:
parent
9e87894a7c
commit
75178634de
@ -1,92 +1,38 @@
|
|||||||
{{define "type:field_new"}}
|
{{define "type:field_new"}}
|
||||||
<div
|
<div class="card" id="field-new-{{.counter}}" style="padding: 10px; margin-top: 10px">
|
||||||
class="w3-card"
|
<div class="row">
|
||||||
id="field-new-{{.counter}}"
|
<div class="col half">
|
||||||
style="padding: 10px; margin-top: 10px"
|
{{ widget_select (print "Fields-New-" .counter "-Widget_id") "Widget" "" .widgets `` }}
|
||||||
>
|
|
||||||
<div class="w3-row">
|
|
||||||
<div class="w3-half">
|
|
||||||
{{ widget_select (print "Fields-New-" .counter "-Widget_id") "Widget" "" .widgets `class=" w3-border"` }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-half">
|
<div class="col half">
|
||||||
<label for="Fields-New-{{.counter}}-Title">Title</label>
|
<label for="Fields-New-{{.counter}}-Title">Title</label>
|
||||||
<input
|
<input type="text" id="Fields-New-{{.counter}}-Title" name="Fields-New-{{.counter}}-Title" value=""/>
|
||||||
class=" w3-border"
|
|
||||||
type="text"
|
|
||||||
id="Fields-New-{{.counter}}-Title"
|
|
||||||
name="Fields-New-{{.counter}}-Title"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w3-row">
|
<div class="row">
|
||||||
<div class="w3-half">
|
<div class="col half">
|
||||||
<label for="Fields-New-{{.counter}}-Attributes">Attributes</label>
|
|
||||||
<input
|
|
||||||
class=" w3-border"
|
|
||||||
type="text"
|
|
||||||
id="Fields-New-{{.counter}}-Attributes"
|
|
||||||
name="Fields-New-{{.counter}}-Attributes"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="w3-half">
|
|
||||||
<label for="Fields-New-{{.counter}}-Valid_values">Valid values</label>
|
<label for="Fields-New-{{.counter}}-Valid_values">Valid values</label>
|
||||||
<input
|
<input type="text" id="Fields-New-{{.counter}}-Valid_values" name="Fields-New-{{.counter}}-Valid_values" value=""/>
|
||||||
class=" w3-border"
|
|
||||||
type="text"
|
|
||||||
id="Fields-New-{{.counter}}-Valid_values"
|
|
||||||
name="Fields-New-{{.counter}}-Valid_values"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col half">
|
||||||
<div class="w3-row">
|
|
||||||
<div class="w3-half">
|
|
||||||
<p>
|
|
||||||
<input
|
|
||||||
id="Fields-New-{{.counter}}-Show_on_list"
|
|
||||||
name="Fields-New-{{.counter}}-Show_on_list"
|
|
||||||
class=""
|
|
||||||
type="checkbox"
|
|
||||||
value="1"
|
|
||||||
/>
|
|
||||||
<label for="Fields-New-{{.counter}}-Show_on_list">Show on list</label>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input
|
|
||||||
id="Fields-New-{{.counter}}-Show_on_view"
|
|
||||||
name="Fields-New-{{.counter}}-Show_on_view"
|
|
||||||
class=""
|
|
||||||
type="checkbox"
|
|
||||||
value="1"
|
|
||||||
/>
|
|
||||||
<label for="Fields-New-{{.counter}}-Show_on_view">Show on view</label>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input
|
|
||||||
id="Fields-New-{{.counter}}-Is_multiple"
|
|
||||||
name="Fields-New-{{.counter}}-Is_multiple"
|
|
||||||
class=""
|
|
||||||
type="checkbox"
|
|
||||||
value="1"
|
|
||||||
/>
|
|
||||||
<label for="Fields-New-{{.counter}}-Is_multiple">Multiple</label>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="w3-half">
|
|
||||||
{{ widget_select (print "Fields-" .Type_field_id "-Ui_section") "Section" "general" $.uisections `class=" w3-border"` }}
|
{{ widget_select (print "Fields-" .Type_field_id "-Ui_section") "Section" "general" $.uisections `class=" w3-border"` }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-bar">
|
<div class="row">
|
||||||
<button
|
<p>
|
||||||
type="button"
|
{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_list" "Show on list" "1" .Show_on_list }}
|
||||||
_="on click remove #field-new-{{.counter}}"
|
</p>
|
||||||
class="w3-right w3-btn w3-metro-dark-red w3-round-large"
|
<p>
|
||||||
>
|
{{ widget_checkbox "Fields-New-{{.counter}}-Show_on_view" "Show on view" "1" .Show_on_view }}
|
||||||
<i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span>
|
</p>
|
||||||
</button>
|
<p>
|
||||||
|
{{ widget_checkbox "Fields-New-{{.counter}}-Is_multiple" "Multiple" "1" .Is_multiple }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bar">
|
||||||
|
<button type="button" _="on click remove #field-new-{{.counter}}" class="delete"><i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="Fields-{{.Type_field_id}}-ToRemove" name="Fields-{{.Type_field_id}}-ToRemove" value=""/>
|
<input type="hidden" id="Fields-{{.Type_field_id}}-ToRemove" name="Fields-{{.Type_field_id}}-ToRemove" value=""/>
|
||||||
</div>
|
</div>
|
||||||
<div class="sbar">
|
<div class="bar">
|
||||||
<button id="Delete-{{.Type_field_id}}" type="button" class="delete"
|
<button id="Delete-{{.Type_field_id}}" type="button" class="delete"
|
||||||
_="on click set {value: '1'} on #Fields-{{.Type_field_id}}-ToRemove then hide me then show #Undelete-{{.Type_field_id}} then add .w3-opacity-max to #Field-{{.Type_field_id}}"
|
_="on click set {value: '1'} on #Fields-{{.Type_field_id}}-ToRemove then hide me then show #Undelete-{{.Type_field_id}} then add .w3-opacity-max to #Field-{{.Type_field_id}}"
|
||||||
>
|
>
|
||||||
|
@ -402,7 +402,6 @@ func widget_checkbox(name string, label string, value string, value_assigned any
|
|||||||
|
|
||||||
switch v := value_assigned.(type) {
|
switch v := value_assigned.(type) {
|
||||||
case int:
|
case int:
|
||||||
|
|
||||||
value_assigned_str = strconv.Itoa(v)
|
value_assigned_str = strconv.Itoa(v)
|
||||||
case int64:
|
case int64:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user