edit_embedded_bot: Check if service is defined.

It's likely that service is undefined which results in
error while loading the template. We should check if the
service and service.config_data is defined or not to avoid
throwing errors.
This commit is contained in:
afeefuddin 2024-07-14 19:57:09 +05:30 committed by Tim Abbott
parent 4457225d35
commit bef77c8cca
1 changed files with 12 additions and 8 deletions

View File

@ -1,9 +1,13 @@
<div id="config_edit_inputbox"> {{#if service}}
{{#each service.config_data}} {{#if service.config_data}}
<div class="input-group"> <div id="config_edit_inputbox">
<label for="embedded_bot_{{@key}}_edit" class="modal-field-label">{{@key}}</label> {{#each service.config_data}}
<input type="text" name="{{@key}}" id="embedded_bot_{{@key}}_edit" class="modal_text_input" <div class="input-group">
maxlength=1000 value="{{this}}" /> <label for="embedded_bot_{{@key}}_edit" class="modal-field-label">{{@key}}</label>
<input type="text" name="{{@key}}" id="embedded_bot_{{@key}}_edit" class="modal_text_input"
maxlength=1000 value="{{this}}" />
</div>
{{/each}}
</div> </div>
{{/each}} {{/if}}
</div> {{/if}}