Skip to content

Commit

Permalink
Follow up d28bc51 - Fixes zammad#4598 - Added missing boolean support.
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Liebe <[email protected]>
  • Loading branch information
rolfschmidt and fliebe92 committed Aug 21, 2023
1 parent d28bc51 commit 7e1f1c7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ class App.UiElement.object_manager_attribute extends App.UiElement.ApplicationUi
return
lastSelected = value
)
@addOptionTranslate(item, params)

@autocompletion: (item, localParams, params) ->
configureAttributes = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<div>
<table class="settings-list" style="width: 100%;">
<thead>
<tr>
<th><%- @T('Key') %>
<th><%- @T('Display') %>
<th style="width: 30px"><%- @T('Default') %>
</thead>
<tbody>
<tr>
<td class="settings-list-control-cell">
true
<td class="settings-list-control-cell">
<input class="form-control form-control--small js-valueTrue" type="text" value="<% if @params.data_option && @params.data_option.options: %><%= @params.data_option.options[true] %><% end %>" name="data_option::options::true" placeholder="<%- @T('yes') %>" required/>
<td class="settings-list-row-control">
<input class="js-selected js-boolean" type="radio" name="data_option::default" value="true" <% if @params.data_option && @params.data_option.default is true: %>checked<% end %>/>
<tr>
<td class="settings-list-control-cell">
false
<td class="settings-list-control-cell">
<input class="form-control form-control--small js-valueFalse" type="text" value="<% if @params.data_option && @params.data_option.options: %><%= @params.data_option.options[false] %><% end %>" name="data_option::options::false" placeholder="<%- @T('no') %>" required/>
<td class="settings-list-row-control">
<input class="js-selected js-boolean" type="radio" name="data_option::default" value="false" <% if @params.data_option && @params.data_option.default is false: %>checked<% end %>/>
</tbody>
</table>
<div class="form-group">
<table class="settings-list" style="width: 100%;">
<thead>
<tr>
<th><%- @T('Key') %>
<th><%- @T('Display') %>
<th style="width: 30px"><%- @T('Default') %>
</thead>
<tbody>
<tr>
<td class="settings-list-control-cell">
true
<td class="settings-list-control-cell">
<input class="form-control form-control--small js-valueTrue" type="text" value="<% if @params.data_option && @params.data_option.options: %><%= @params.data_option.options[true] %><% end %>" name="data_option::options::true" placeholder="<%- @T('yes') %>" required/>
<td class="settings-list-row-control">
<input class="js-selected js-boolean" type="radio" name="data_option::default" value="true" <% if @params.data_option && @params.data_option.default is true: %>checked<% end %>/>
<tr>
<td class="settings-list-control-cell">
false
<td class="settings-list-control-cell">
<input class="form-control form-control--small js-valueFalse" type="text" value="<% if @params.data_option && @params.data_option.options: %><%= @params.data_option.options[false] %><% end %>" name="data_option::options::false" placeholder="<%- @T('no') %>" required/>
<td class="settings-list-row-control">
<input class="js-selected js-boolean" type="radio" name="data_option::default" value="false" <% if @params.data_option && @params.data_option.default is false: %>checked<% end %>/>
</tbody>
</table>
</div>
<div class="js-inputTranslate"></div>
</div>

0 comments on commit 7e1f1c7

Please sign in to comment.