Skip to content

Commit

Permalink
feat(frontend): now update radio state with current igopher config
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Aug 21, 2021
1 parent d9f2075 commit 359431f
Show file tree
Hide file tree
Showing 3 changed files with 597 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
<div class="form-group mb-3">
<label class="form-label">Greeting:&nbsp;</label>
<div class="form-check">
<input type="radio" class="form-check-input" id="formCheck-5" value="true" name="greetingActivation" required /><label
<input type="radio" class="form-check-input" id="greetingRadioEnabled" value="true" name="greetingActivation" required /><label
class="form-check-label"
for="formCheck-1"
for="greetingRadioEnabled"
>Enabled</label
>
</div>
<div class="form-check disabled">
<input type="radio" class="form-check-input" id="formCheck-6" value="false" name="greetingActivation" required checked /><label
<input type="radio" class="form-check-input" id="greetingRadioDisabled" value="false" name="greetingActivation" required checked /><label
class="form-check-label"
for="formCheck-2"
for="greetingRadioDisabled"
>Disabled</label
>
<div class="invalid-feedback">Invalid input!</div>
Expand Down Expand Up @@ -179,6 +179,11 @@ import Multiselect from '@vueform/multiselect'
greetingTemplateField.value =
config.igopherConfig.auto_dm.greeting.greetingTemplate;
const greetingRadio = document.getElementById(
config.igopherConfig.auto_dm.greeting.greetingActivation == "true" ? "greetingRadioEnabled" : "greetingRadioDisabled"
) as HTMLInputElement;
greetingRadio.checked = true;
const scrappingQuantityField = document.getElementById(
"scrappingQuantity"
) as HTMLInputElement;
Expand Down

0 comments on commit 359431f

Please sign in to comment.