Skip to content

Commit

Permalink
Improve help
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Nov 14, 2022
1 parent 169d440 commit 95cc84a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="main-<?php echo $translatableItem['identifier']?>">
<label ng-non-bindable><?php echo $fields[$translatableItem['identifier']]['trans'];?></label>
<label ng-non-bindable>
<?php echo $fields[$translatableItem['identifier']]['trans'];?>
<?php if (isset($fields[$translatableItem['identifier']]['help'])) : ?>
<a href="#" onclick="lhc.revealModal({'url':WWW_DIR_JAVASCRIPT+'genericbot/help/<?php echo $fields[$translatableItem['identifier']]['help']?>'});" class="material-icons text-muted">help</a>
<?php endif; ?>
</label>
<div class="form-group">
<?php if (isset($translatableItem['bb_code_selected'])) : ?>
<?php $bbcodeOptions = array('selector' => $translatableItem['bb_code_selected']); ?>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Sample how to use uploaded image from Design section
<div class="alert alert-success" role="alert">
<?php echo nl2br(htmlspecialchars('[html]
<img src="{proactive_img_1}" alt="" />
[/html]')); ?>
</div>

Supported replaceable variables. They are taken from online visitor passed variables.
<ul>
<li><span class="badge badge-secondary">{nick}</span> - visitor nick if we know it from previous chats</li>
<li><span class="badge badge-secondary">{lhc.var.&lt;variable key&gt;}</span> - invisible by operator</li>
<li><span class="badge badge-secondary">{lhc.add.&lt;variable key&gt;}</span> - visible by operator</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
),
'message' => array(
'type' => 'textarea',
'help' => 'inv_message',
'translatable' => true,
'main_attr_lang' => 'design_data_array',
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/proactivechatinvitation', 'Message to user'),
Expand Down

0 comments on commit 95cc84a

Please sign in to comment.