discourse/app/assets/javascripts/admin/templates/components/embeddable-host.hbs
Joffrey JAFFEUX 746c5927e1 Replaces remaining {{category-chooser}} by {{category-select-box}}
To achieve replacement, this commit also adds support for:
- clearSelectionLabel which will allows to unselect any chosen category
- select-box inside a modal
- fixes minor css positioning issues

Note: {{category-chooser}} will be removed in the next weeks.
2017-08-30 17:04:17 +02:00

28 lines
883 B
Handlebars

{{#if editing}}
<td>
{{input value=buffered.host placeholder="example.com" enter="save" class="host-name"}}
</td>
<td>
{{input value=buffered.class_name placeholder="class" enter="save" class="class-name"}}
</td>
<td>
{{input value=buffered.path_whitelist placeholder="/blog/.*" enter="save" class="path-whitelist"}}
</td>
<td>
{{category-select-box value=categoryId class="small"}}
</td>
<td>
{{d-button icon="check" action="save" class="btn-primary" disabled=cantSave}}
{{d-button icon="times" action="cancel" class="btn-danger" disabled=host.isSaving}}
</td>
{{else}}
<td>{{host.host}}</td>
<td>{{host.class_name}}</td>
<td>{{host.path_whitelist}}</td>
<td>{{category-badge host.category}}</td>
<td>
{{d-button icon="pencil" action="edit"}}
{{d-button icon="trash-o" action="delete" class='btn-danger'}}
</td>
{{/if}}