Skip to content

Commit

Permalink
Merge pull request #737 from Anisan/patch-3
Browse files Browse the repository at this point in the history
Simple devices: add config_type readonly, rgb
  • Loading branch information
sergejey committed May 14, 2020
2 parents 2753a34 + 39c8154 commit ff07078
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions templates/devices/devices_edit_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
[#if CONFIG_HELP!=""#]<#LANG_HCB#>[#CONFIG_HELP#]<#LANG_HCE#>[#endif#]
</div>
<div class="col-md-7">
[#if CONFIG_TYPE="readonly"#]
[#VALUE#]
[#endif#]
[#if CONFIG_TYPE="rgb"#]
<script src='<#ROOTHTML#>3rdparty/spectrum/spectrum.min.js'></script>
<link rel='stylesheet' href='<#ROOTHTML#>3rdparty/spectrum/spectrum.min.css' />
<input type="text" value="[#VALUE#]" name="[#NAME#]_value" id="[#NAME#]_value" class="form-control colorpicker">
<script>
$("#[#NAME#]_value").spectrum({
preferredFormat: "hex",
showInput: true,
chooseText: "OK",
cancelText: "<#LANG_CANCEL#>"
});
</script>
[#endif#]
[#if CONFIG_TYPE="num" || CONFIG_TYPE="text"#]
<input type="text" value="[#VALUE#]" name="[#NAME#]_value" class="form-control">
[#endif#]
Expand Down

0 comments on commit ff07078

Please sign in to comment.