-
-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1686 from LiveHelperChat/master-forms
Forms tight integration
- Loading branch information
Showing
17 changed files
with
451 additions
and
182 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 9 additions & 1 deletion
10
lhc_web/design/defaulttheme/tpl/lhgenericbot/message/content/execute_js.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<?php if ((isset($async_call) && $async_call == true) || (isset($chat_started_now) && isset($chat_started_now) == true)) : ?> | ||
|
||
<?php if (!(isset($react) && $react == true)) : ?> | ||
<div class="meta-message-<?php echo $messageId?>"> | ||
<script data-bot-action="execute-js" <?php if (isset($metaMessage['chat_emit'])) : ?>data-bot-emit='<?php echo $metaMessage['chat_emit']?>'<?php endif; ?> <?php if (isset($metaMessage['chat_event'])) : ?>data-bot-event='<?php echo $metaMessage['chat_event']?>'<?php endif; ?> <?php if (isset($metaMessage['ext_args'])) : ?>data-bot-args='<?php echo $metaMessage['ext_args']?>'<?php endif; ?> <?php if (isset($metaMessage['ext_execute'])) : ?>data-bot-extension="<?php echo $metaMessage['ext_execute']?>"<?php endif;?> > | ||
<?php endif; ?> | ||
|
||
<script class="meta-message-<?php echo $messageId?>" data-bot-action="execute-js" <?php if (isset($metaMessage['chat_emit'])) : ?>data-bot-emit='<?php echo $metaMessage['chat_emit']?>'<?php endif; ?> <?php if (isset($metaMessage['chat_event'])) : ?>data-bot-event='<?php echo $metaMessage['chat_event']?>'<?php endif; ?> <?php if (isset($metaMessage['ext_args'])) : ?>data-bot-args='<?php echo $metaMessage['ext_args']?>'<?php endif; ?> <?php if (isset($metaMessage['ext_execute'])) : ?>data-bot-extension="<?php echo $metaMessage['ext_execute']?>"<?php endif;?> > | ||
<?php if (isset($metaMessage['ext_execute'])) : ?> | ||
lhinst.executeExtension(<?php echo json_encode($metaMessage['ext_execute'])?>,<?php echo json_encode(json_decode($metaMessage['ext_args'],true))?>); | ||
<?php elseif (isset($metaMessage['payload'])) : ?> | ||
<?php echo $metaMessage['payload']?> | ||
<?php endif; ?> | ||
</script> | ||
|
||
<?php if (!(isset($react) && $react == true)) : ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
lhc_web/lib/core/lhabstract/fields/erlhabstractmodelform.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
return array( | ||
'name' => array( | ||
'type' => 'text', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Name for personal purposes'), | ||
'required' => true, | ||
'link' => erLhcoreClassDesign::baseurl('form/collected'), | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'content' => array( | ||
'type' => 'textarea', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Content'), | ||
'required' => false, | ||
'ace_editor' => 'html', | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'name_attr' => array ( | ||
'type' => 'text', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Name attributes'), | ||
'required' => false, | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'intro_attr' => array ( | ||
'type' => 'text', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Introduction attributes'), | ||
'required' => false, | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'xls_columns' => array ( | ||
'type' => 'textarea', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','XLS Columns'), | ||
'required' => false, | ||
'height' => '100px', | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'recipient' => array ( | ||
'type' => 'text', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Recipient'), | ||
'required' => false, | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'post_content' => array( | ||
'type' => 'textarea', | ||
'ace_editor' => 'html', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Post content after form is submitted'), | ||
'required' => false, | ||
'hidden' => true, | ||
'height' => '150px', | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'pagelayout' => array ( | ||
'type' => 'text', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Custom pagelayout'), | ||
'required' => false, | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'unsafe_raw' | ||
)), | ||
'active' => array ( | ||
'type' => 'checkbox', | ||
'trans' => erTranslationClassLhTranslation::getInstance()->getTranslation('abstract/browserofferinvitation','Active'), | ||
'required' => false, | ||
'hidden' => true, | ||
'validation_definition' => new ezcInputFormDefinitionElement( | ||
ezcInputFormDefinitionElement::OPTIONAL, 'boolean' | ||
)) | ||
); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.