#8 Relais ein / ausschalten von Ocotprint aus

- Toggle Button enable / disable in Einstellunge
- Databinding von Button
This commit is contained in:
David Zingg 2019-11-24 15:59:37 +01:00
parent 576a53fad1
commit c76712159f
2 changed files with 9 additions and 1 deletions

View File

@ -17,4 +17,12 @@
</div>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" id="mystromswitchShowToggleButton" data-bind="checked: settings.plugins.mystromswitch.onOffButtonEnabled">Toggle Button Enabled
</label>
</div>
</div>
</form>

View File

@ -1,4 +1,4 @@
<div class="sidebar_plugin_mystromswitch">
<label class="control-label" id="mystromswitchPowerValue">Powerconsumption 0.0W</label>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent">{{ _('Toggle Relais') }}</button>
<button class="btn btn-primary" data-bind="click: onToggleRelayEvent">{{ _('Toggle Relais') }}, visible : settings.plugins.mystromswitch.onOffButtonEnabled"/>
</div>