protected function getSettingsMenuContentDialogs()
 {
     return '<div id="grid-settings-dialog-' . $this->widgetKey . '" 
           style="display: none;">' . '<div>' . Yii::t('profile', 'Use persistent filter and sort settings?') . '</div>' . CHtml::checkbox('dbPersistentGridSettings', self::getJSONProperty($this->profile, 'dbPersistentGridSettings', $this->widgetType, $this->widgetUID), array('id' => 'dbPersistentGridSettings-' . $this->widgetKey)) . X2Html::hint(Yii::t('profile', 'Leaving this box checked will prevent your grid filter and ' . 'sort settings from being reset when you log out of the app.'), false, null, true, true) . '</div>' . parent::getSettingsMenuContentDialogs();
 }
Exemple #2
0
echo Yii::t('admin', 'Mass Duplicate Detection and Removal');
?>
</h2></div>
<div class="form">
    <div style="max-width: 630px;">
        <?php 
echo Yii::t('admin', 'This interface allows you to view all potential duplicates within your system and act to resolve them.');
?>
        <?php 
echo Yii::t('admin', 'Clicking an individual record in one of the grids will take you to the duplicate resolution page for that record and redirect you to this page after resolution.');
?>
    </div>
    <br>
    <div style="max-width:630px;">
        <?php 
echo Yii::t('admin', 'Currently displaying {type} duplicates.', array('{type}' => $showAll ? Yii::t('admin', 'all') : Yii::t('admin', 'unresolved'))) . ' ' . X2Html::hint(Yii::t('admin', 'Unresolved duplicates are records which have yet to be manually dealt with via the duplicate checker. All duplicates includes records which have already been acted upon.'));
echo "<br><br>" . X2Html::tag('a', array('class' => 'x2-button', 'href' => $this->createUrl('admin/massDedupe', array('showAll' => !$showAll))), $showAll ? Yii::t('admin', 'Show Unresolved') : Yii::t('admin', 'Show All')) . "<br><br>";
?>
    </div>
    <?php 
foreach ($dataProviders as $modelType => $dataProvider) {
    Yii::app()->clientScript->registerScript($modelType . '-duplicate-grid', ' 
                $("#' . $modelType . '-show-duplicates").on("click",function(){
                        if($("#' . $modelType . '-duplicates").is(":visible")){
                            $(this).removeClass("fa-minus-square");
                            $(this).addClass("fa-plus-square");
                            $("#' . $modelType . '-duplicates").hide();
                        } else {
                            $(this).removeClass("fa-plus-square");
                            $(this).addClass("fa-minus-square");
                            $("#' . $modelType . '-duplicates").show();
Exemple #3
0
 public function renderFilterHint()
 {
     echo X2Html::hint(self::getFilterHintText(), false, $this->getNamespacePrefix() . '-filter-hint', false, false);
 }
Exemple #4
0
    <?php 
if ($model->type === 'email') {
    ?>
	<div class="row">
    <?php 
    echo $form->label($model, 'associationType');
    echo $form->dropdownList($model, 'associationType', $associationTypeOptions, array('id' => 'email-association-type'));
    echo $form->error($model, 'associationType');
    ?>
	</div>
	<div class="row">
    <?php 
    echo $form->label($model, 'emailTo');
    echo $form->textField($model, 'emailTo', array('id' => 'email-to-field'));
    echo $form->error($model, 'emailTo');
    echo X2Html::hint(Yii::t('docs', 'Leaving this field blank will preserve its default behavior.'), false);
    ?>
	</div>
    <?php 
}
?>
	<div class="row">
        <?php 
if (in_array($model->type, array('email', 'quote'))) {
    echo $form->label($model, 'subject');
    echo $form->textField($model, 'subject', array('maxlength' => 255, 'id' => 'doc-subject'));
    echo $form->error($model, 'subject');
}
?>
		<span id="savetime">
			<?php 
 public function renderInputs()
 {
     $htmlOptions = array('style' => 'display:inline-block;margin-right: 10px;');
     echo CHtml::activeCheckBox($this, 'createContact', $this->htmlOptions('createContact', $htmlOptions));
     echo CHtml::activeLabel($this, 'createContact', $this->labelOptions('createContact', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', 'If disabled, the email dropbox will ignore any emails that are to or from addresses not matching any contacts in X2Engine. If enabled, new contacts will be created automatically using name info contained in the email.'));
     echo '<br />';
     echo '<div style="margin-left:20px;' . ((bool) $this->createContact ? '' : 'display:none') . '" id="empty-contact">';
     echo CHtml::activeCheckBox($this, 'emptyContact', $this->htmlOptions('emptyContact', $htmlOptions));
     echo CHtml::activeLabel($this, 'emptyContact', $this->labelOptions('emptyContact', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', "If enabled, the email dropbox will create a new contact record associated with a new unique email address even if the first and last name cannot be found in the email. If disabled, it ignores all email that does not contain contacts' first and last names. This setting has no effect if {ccfe} is disabled.", array('{ccfe}' => '"' . Yii::t('admin', 'Create contacts from emails') . '"')));
     echo '</div>';
     echo CHtml::activeCheckBox($this, 'zapLineBreaks', $this->htmlOptions('zapLineBreaks', $htmlOptions));
     echo CHtml::activeLabel($this, 'zapLineBreaks', $this->labelOptions('zapLineBreaks', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', 'If enabled, the mail parser will (when extracting the body of an email) attempt to clear the text of artificial line breaks induced by RFC email format specifications (which limit lines to 78 characters). If disabled, the email parser will not do this.'));
     echo '<br />';
     echo CHtml::activeCheckBox($this, 'logging', $this->htmlOptions('logging', $htmlOptions));
     echo CHtml::activeLabel($this, 'logging', $this->labelOptions('logging', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', 'If enabled, the email dropbox will record email capture events in a log file in protected/runtime. This option is useful for troubleshooting but will take up some extra disk space on a system that captures a high volume of emails.'));
     echo '<br />';
     echo CHtml::activeCheckBox($this, 'ignoreEmptyName', $this->htmlOptions('ignoreEmptyName', $htmlOptions));
     echo CHtml::activeLabel($this, 'ignoreEmptyName', $this->labelOptions('ignoreEmptyName', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', "If disabled, the import will exit and send an error message email if the forwarded message header does not contain the sender's full name."));
     echo '<br />';
     echo CHtml::activeLabel($this, 'caseFlag', $this->labelOptions('caseFlag', $htmlOptions));
     echo CHtml::activeTextField($this, 'caseFlag', $this->htmlOptions('caseFlag', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', 'When sending an email, you can specify a case to attach the email to by putting this code, followed immediately by the case ID, into the email body before the forwarded message, or without any case ID to create a new case from the email.'));
     echo '<br />';
     echo CHtml::activeLabel($this, 'alias', $this->labelOptions('alias', $htmlOptions));
     echo CHtml::activeTextField($this, 'alias', $this->htmlOptions('alias', $htmlOptions));
     echo X2Html::hint(Yii::t('admin', 'The address to use as the sender when sending error notification emails, if no default is set for system notifications. By default, if left blank, the email dropbox will use the first addresses in the {tohf} or {cchf} field that contains {dbat}.', array('{tohf}' => 'To:', '{cchf}' => 'CC:', '{dbat}' => '"dropbox@"')));
     echo '<br />';
     echo "<script type=\"text/javascript\">\n                (function(\$) {\n                    \$(\"[name='" . $this->resolveName('createContact') . "']\").change(function() {\n                        if(\$(this).is(':checked'))\n                            \$('#empty-contact').fadeIn(300);\n                        else\n                            \$('#empty-contact').fadeOut(300);\n                    }).each(function(){\n                        if(!\$(this).is(':checked'))\n                            \$('#empty-contact').hide();\n                        else\n                            \$('#empty-contact').show();\n                    });\n                })(jQuery);\n              </script>";
 }
Exemple #6
0
<br><br>
<?php 
echo Yii::t('admin', 'Each record type should have a set of column names as metadata with the type of record (e.g. "Contacts" or "Accounts" at the end.  Each record should also have the record type as the last column.');
?>
<br><br>
<h3><?php 
echo Yii::t('contacts', 'Upload File');
?>
</h3>
<?php 
echo CHtml::form('import', 'post', array('enctype' => 'multipart/form-data', 'id' => 'file-form'));
echo CHtml::activeFileField($formModel, 'data', array('id' => 'data'));
echo CHtml::error($formModel, 'data');
?>
 <br><br>
<?php 
echo Yii::t('admin', 'Overwrite old data');
echo X2Html::hint("Overwriting is disabled on Fields as this would remove all currently existing data in that field.");
?>
<br>
<?php 
echo CHtml::activeDropDownList($formModel, 'overwrite', array(0 => Yii::t('app', 'No'), 1 => Yii::t('app', 'Yes')), array('id' => 'overwrite-selector'));
?>
 <br><br>
<?php 
echo CHtml::submitButton(Yii::t('app', 'Submit'), array('class' => 'x2-button', 'id' => 'import-button'));
echo CHtml::endForm();
?>
</div>
</div>
Exemple #7
0
        <div class="cell"><?php 
echo X2Html::hint(Yii::t('admin', "If this box is checked, the activity feed will not be populated with the new records."), false);
?>
</div>
        <div class="cell"><?php 
echo CHtml::checkBox('activity-feed-box');
?>
</div>
    </div>
    <div class="row">
        <div class="cell"><strong><?php 
echo Yii::t('admin', 'Batch Size');
?>
</strong></div>
        <div class="cell"><?php 
echo X2Html::hint(Yii::t('admin', "Modify the number of records to be process per batch request."), false);
?>
</div>
        <div class="cell"><?php 
echo CHtml::textField('batch-size', 25, array('style' => 'width: 32px'));
?>
</div>
        <div class="cell"><?php 
$this->widget('zii.widgets.jui.CJuiSlider', array('value' => 25, 'options' => array('min' => 5, 'max' => 1000, 'step' => 5, 'change' => "js:function(event,ui) {\n                                    \$('#batch-size').val(ui.value);\n                                }", 'slide' => "js:function(event,ui) {\n                                    \$('#batch-size').val(ui.value);\n                                }"), 'htmlOptions' => array('style' => 'width:200px;margin:6px 9px;', 'id' => 'batch-size-slider')));
?>
</div>
    </div>

</div>
<br /><br />
<?php 
Exemple #8
0
    <div id='quick-create-list-form' style='display:none'>
        <h3><?php 
echo Yii::t('contacts', 'New Contact List');
?>
</h3>
    </div>
        <div class='row'>
            <label><?php 
echo Yii::t('marketing', 'Email Template:');
?>
</label>
            <?php 
echo X2Html::activeDropDownList($model, 'template', $templates);
?>
            <?php 
echo X2Html::hint(Yii::t('marketing', "Choose a email template to use for this campaign, or create a custom one here."));
?>
        </div>
    </div>

</div>

<?php 
$this->widget('FormView', array('model' => $model, 'form' => $form, 'suppressFields' => array('listId')));
?>

<div id='bottom-container'>
    
    <div id='save-template-container'>
        <span class='x2-button 'id='save-template'><?php 
echo Yii::t('marketing', 'Save Email As Template');
Exemple #9
0
            <label class='left-label' 
             for='generateLead'><?php 
echo Yii::t('app', 'Generate {Lead}: ', array('{Lead}' => Modules::displayName(false, 'X2Leads')));
?>
</label>
            <input id='generate-lead-checkbox' type='checkbox'  name='generateLead'>
            <?php 
echo X2Html::hint(Yii::t('app', 'If you have this box checked, a new {lead} record will be associated ' . 'with the new {contact} when the web lead form is submitted. The web lead form ' . 'must be saved for this feature to take effect.', array('{lead}' => strtolower(Modules::displayName(false, 'X2Leads')), '{contact}' => strtolower(Modules::displayName(false, 'Contacts')))), false, null, true);
?>
            <div id='generate-lead-form' style='display: none;'>
            <?php 
echo CHtml::activeLabel(X2Model::model('Contacts'), 'leadSource');
echo X2Model::model('X2Leads')->renderInput('leadSource', array('class' => 'left-label', 'name' => 'leadSource'));
?>
            </div>
        </div>
        <div class="row">
            <label class='left-label' 
             for='generateAccount'><?php 
echo Yii::t('app', 'Generate {Account}: ', array('{Account}' => Modules::displayName(false, 'Accounts')));
?>
</label>
            <input id='generate-account-checkbox' type='checkbox'  name='generateAccount'>
            <?php 
echo X2Html::hint(Yii::t('app', 'If you have this box checked, a new {account} record will be generated ' . 'using the new {contact}\'s company field when the web lead form is submitted. The ' . 'web lead form must be saved for this feature to take effect.', array('{account}' => strtolower(Modules::displayName(false, 'Accounts')), '{contact}' => strtolower(Modules::displayName(false, 'Contacts')))), false, null, true);
?>
        </div>
    </div>
</div>

Exemple #10
0
        <br/>
        <div class="row">
            <div class="cell">
                <?php 
echo $form->labelEx($model, 'doNotEmailPage', array('class' => 'left'));
echo X2Html::hint(Yii::t('admin', 'This is the page that will be displayed to contacts after ' . 'they have clicked the "Do Not Email" link contained in an email.'), false, null, true);
echo $form->richTextarea($model, 'doNotEmailPage');
?>
            </div>
        </div>
        <div class="row">
            <div class="cell">
                <?php 
echo $form->checkbox($model, 'enableUnsubscribeHeader', array('class' => 'left'));
echo $form->labelEx($model, 'enableUnsubscribeHeader', array('class' => 'left'));
echo X2Html::hint(Yii::t('admin', 'This option enables use of the List-Unsubscribe email ' . 'header. This allows compatible email clients to present custom unsubscribe ' . 'controls. Additionally, including a List-Unsubscribe header can increase ' . 'sender reputation with Email Service Providers.'), false, null, true);
?>
            </div>
        </div>
        <br/><hr/>
        <br/>

        <?php 
//echo $form->labelEx($admin,'chatPollTime');
?>
        <?php 
// echo $form->textField($admin,'chatPollTime',array('id'=>'chatPollTime'));
?>

        <?php 
echo CHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'x2-button', 'id' => 'save-button')) . "\n";
Exemple #11
0
?>
			<?php 
echo $form->textField($model, 'googleId', array('size' => 40, 'maxlength' => 250)) . ' <span class="x2-hint" title="This field should contain a Google Account (i.e. yourname@gmail.com) which you can use to log in to X2Engine with if Google Integration has been enabled.">[?]</span>';
?>
			<?php 
echo $form->error($model, 'googleId');
?>
		</div>
	</div>
	
	<div class="row">
		<div class="cell">
			<?php 
echo $form->labelEx($model, 'leadRoutingAvailability');
echo $form->checkBox($model, 'leadRoutingAvailability');
echo X2Html::hint(Yii::t('profile', 'Uncheck this box if you do no want to be automatically ' . 'assigned new leads through lead routing.'), false, null, true);
?>
		</div>
	</div>

	<div class="row">
		<?php 
Yii::app()->clientScript->registerPackage('ckeditor');
$notNullAttributes = array_filter($model->attributes, function ($a) {
    return !empty($a);
});
$insertableAttributes = array();
foreach ($notNullAttributes as $attr => $value) {
    $insertableAttributes[$model->getAttributeLabel($attr)] = $value;
}
$insertableAttributes = array(Yii::t('app', 'Profile') => $insertableAttributes);
Exemple #12
0
 /**
  * Renders the quick create/ Field help icons
  */
 public function renderExtra($field)
 {
     $html = '';
     if ($field->type === 'link' && !$this->suppressQuickCreate && isset($this->quickCreateModels[$field->linkType])) {
         $html .= X2Html::tag('span', array('class' => "quick-create-button create-{$field->linkType}"), '+');
         $this->_quickCreateButtonTypes[] = $field->linkType;
     }
     if (!empty($field->description)) {
         $html .= X2Html::hint($field->description);
     }
     return $html;
 }
Exemple #13
0
$justMeUrl = $this->controller->createUrl('/site/toggleShowTags', array('tags' => 'justMe'));
$allUsersUrl = $this->controller->createUrl('/site/toggleShowTags', array('tags' => 'allUsers'));
?>
<span style="float:left"><?php 
echo CHtml::ajaxLink(Yii::t('app', 'Just Me'), $justMeUrl, array('success' => 'function(response) { 
            $("#myTags").show(); 
            $("#allTags").hide(); 
        } ')) . " | " . CHtml::ajaxLink(Yii::t('app', 'All Users'), $allUsersUrl, array('success' => 'function() { 
            $("#allTags").show(); 
            $("#myTags").hide(); 
        }')) . "<br />";
?>
</span>
<span style="float:right">
    <?php 
echo X2Html::hint(Yii::t('app', 'Pressing the X button on a tag will hide it from this widget. Hidden tags can ' . 'be restored from your Preferences page.'));
?>
</span> <br><br>
<div id="myTags" <?php 
echo $showAllUsers ? 'style="display:none;"' : '';
?>
>
<?php 
foreach ($myTags as &$tag) {
    echo '<span style="position:relative;" class="tag hide" tag-name="' . substr($tag['tag'], 1) . '">' . CHtml::link(CHtml::encode($tag['tag']), array('/search/search', 'term' => '#' . ltrim($tag['tag'], '#')), array('class' => 'x2-link x2-tag')) . '</span>';
}
?>
</div>

<div id="allTags"  <?php 
echo $showAllUsers ? '' : 'style="display:none;"';
Exemple #14
0
?>
</h3>
<div id="import-progress-bar" style="display:none;">
<?php 
if ($csvLength !== null) {
    $this->widget('X2ProgressBar', array('uid' => 'x2import', 'max' => $csvLength, 'label' => ''));
}
?>
</div>
<div id="prep-status-box">

</div>
<br />
<div id="status-box">

</div>
<div id="failures-box">

<div id="continue-box" style="display:none;">
<br />
<?php 
echo CHtml::link(Yii::t('admin', 'Import more {records}', array('{records}' => X2Model::getModelTitle($model))), 'importModels?model=' . $model, array('class' => 'x2-button'));
echo CHtml::link(Yii::t('admin', 'Import to another module'), 'importModels', array('class' => 'x2-button'));
echo CHtml::link(Yii::t('admin', 'Rollback Import'), array('rollbackImport', 'importId' => $_SESSION['importId']), array('class' => 'x2-button', 'id' => 'revert-btn', 'style' => 'display:none;'));
$importerMessages = array('success' => Yii::t('admin', 'Import setup completed successfully.'), 'begin' => Yii::t('admin', 'Beginning import.'), 'complete' => Yii::t('admin', 'Import Complete!'), 'failCreate' => Yii::t('admin', "Import preparation failed.  Failed to create the following fields: "), 'failConflicting' => Yii::t('admin', "Import preparation failed.  The following fields already exist: "), 'failRequired' => Yii::t('admin', "Import Preparation failed. The following required fields were not mapped: "), 'confirm' => Yii::t('admin', "You have mapped multiple columns to the same field, are you sure you would like to proceed? The following fields were mapped more than once: "), 'aborting' => Yii::t('admin', "Import preparation failed.  Aborting import."), 'nonUniqueAssocMatch' => Yii::t('admin', 'You have selected to match link type fields on ' . 'non-unique attributes. This can result in an association being ' . 'formed with the incorrect record. Are you sure you would like to proceed? ' . 'The following mappings would match on non-unique attributes: '), 'modelsImported' => Yii::t('admin', " <b>{model}</b> have been successfully imported.", array('{model}' => $model)), 'modelsLinked' => Yii::t('admin', "were created and linked to {model}.", array('{model}' => $model)), 'modelsFailed' => Yii::t('admin', " <b>{model}</b> have failed validation and were not imported.", array('{model}' => $model)), 'clickToRecover' => Yii::t('admin', 'Click here to recover them: ', array('{model}' => $model)) . "<a href=\"#\" id=\"download-link\" class=\"x2-button\">" . Yii::t('admin', "Download") . "</a>");
Yii::app()->clientScript->registerScriptFile(Yii::app()->getBaseUrl() . '/js/importexport.js');
?>
</div>
<?php 
Yii::app()->clientScript->registerScript('importexport', "\n    if (typeof x2 == 'undefined')\n        x2 = {};\n    if (typeof x2.importer == 'undefined') {\n        x2.importer = {\n            batchSize: 25\n        };\n    }\n\n    x2.importer.model = " . CJSON::encode($model) . ";\n    x2.importer.preselectedMap = " . ($preselectedMap ? 'true' : 'false') . ";\n    x2.importer.numSampleRecords = " . count($sampleRecords) . ";\n    x2.importer.attributeLabels = " . CJSON::encode(X2Model::model($model)->attributeLabels(), false) . ";\n    x2.importer.failedRecordsUrl = " . CJSON::encode($this->createUrl('/admin/downloadData', array('file' => 'failedRecords.csv'))) . ";\n    x2.importer.modifiedPresetMap = false;\n    x2.importer.messageTranslations = " . CJSON::encode($importerMessages) . ";\n    x2.importer.linkFieldModelMap = " . CJSON::encode($linkFieldModelMap) . ";\n    x2.importer.linkedRecordDropdowns = " . CJSON::encode($linkedRecordDropdowns) . ";\n    x2.importer.linkFieldHint = " . CJSON::encode(X2Html::hint(Yii::t('app', 'Please select the attribute you would like to match on to link the associated record.'))) . ";\n\n    \$(function() {\n        // Hide the import map box if a mapping was uploaded\n        if (x2.importer.preselectedMap)\n            \$('#super-import-map-box').hide();\n\n        // Present a dropdown to select the match attribute for reconstructing\n        // associations for link type fields\n        \$.each (\$('#import-map select'), function(i, dropdown) {\n            if (\$.inArray(\$(dropdown).val(), Object.keys(x2.importer.linkFieldModelMap)) != -1)\n                x2.importer.showLinkFieldMatchSelector (\$(dropdown));\n        });\n    });\n\n    \$('#process-link').click(function(){\n       \$('#editPresetMap').hide();\n       x2.importer.prepareImport();\n    });\n\n    \$('#fill-fields-box').change(function(){\n        \$('#fields').toggle();\n    });\n\n     \n\n    \$('#log-comment-box').change(function(){\n       \$('#comment-form').toggle();\n    });\n\n    \$('#batch-size').change(function() {\n        \$('#batch-size-slider').slider('value', \$('#batch-size').val ());\n    });\n\n    // Present an additional dropdown to select the linked record's match attribute\n    \$('.import-attribute').change(function() {\n        var selected = \$(this).val();\n        var linkedModel = x2.importer.linkFieldModelMap[selected];\n        var attributeId = \$(this).attr('id');\n        if (\$.inArray(selected, Object.keys(x2.importer.linkFieldModelMap)) != -1 &&\n                typeof x2.importer.linkedRecordDropdowns[linkedModel] !== undefined) {\n            x2.importer.showLinkFieldMatchSelector (\$(this));\n        } else {\n            // Remove the match attribute dropdown\n            var children = \$(this).siblings('#' + attributeId + '-linkSelector');\n            \$(children).remove();\n            \$(this).parent()\n                .css ('border', '')\n                .children ('span').remove();\n        }\n    });\n\n    \$('#add-link').click(function(e){\n       e.preventDefault();\n       \$('#field-box').append(x2.importer.createAttrCell());\n       \$('.del-link').click(function(e){\n            e.preventDefault();\n            \$(this).closest('.field-row').remove();;\n        });\n    });\n\n    \$('#export-map').click(function(e) {\n        e.preventDefault();\n        var keys = new Array();\n        var attributes = new Array();\n        \$('.import-attribute').each(function(){\n            if (\$(this).val() != '') {\n                // Add mapping overrides that are not marked 'DO NOT MAP'\n                attributes.push(\$(this).val());\n                keys.push(\$(this).attr('name'));\n            }\n        });\n        \$.ajax({\n            url: 'exportMapping',\n            type: 'POST',\n            data: {\n                model: x2.importer.model,\n                name: \$('#mapping-name').val(),\n                attributes: attributes,\n                keys: keys\n            },\n            success: function(data) {\n                data = JSON.parse(data);\n                response = x2.importer.interpretPreparationResult (data);\n\n                if (response.success) {\n                    var filename = data['map_filename'];\n                    \$('#download-map').attr ('data-map_filename', filename);\n                    \$('#download-map').show();\n                    \$('#prep-status-box').css({'color':'green'});\n                    \$('#prep-status-box').html(response.msg);\n                } else {\n                    \$('#prep-status-box').css({'color':'red'});\n                    \$('#prep-status-box').html(response.msg);\n                }\n            }\n        });\n    });\n\n    \$('#download-map').click(function(e) {\n        e.preventDefault();\n        var downloadUrl = '" . $this->createUrl('admin/downloadData') . "';\n        var filename = \$('#download-map').attr ('data-map_filename');\n        window.location.href = downloadUrl + '?file=' + filename;\n    });\n\n    \$('#editPresetMap').click(function(e) {\n        e.preventDefault();\n        \$(this).hide();\n        \$('#importMapSummary').hide();\n        \$('#super-import-map-box').slideDown(500);\n        x2.importer.modifiedPresetMap = true;\n    });\n", CClientScript::POS_READY);
Exemple #15
0
                                 $htmlString .= X2Model::renderMergeInput($modelName, $idArray, $field);
                             } else {
                                 if (isset($specialFields[$fieldName])) {
                                     $htmlString .= $specialFields[$fieldName];
                                 } else {
                                     $htmlString .= $model->renderInput($fieldName, array('tabindex' => isset($item['tabindex']) ? $item['tabindex'] : null, 'disabled' => $item['readOnly'] ? 'disabled' : null, 'style' => $field->type === 'text' ? 'height: ' . $textFieldHeight : ''));
                                 }
                             }
                             $htmlString .= "</div>";
                             $htmlString .= "<div class='extra-column'>";
                             if ($field->type === 'link' && !$suppressQuickCreate && isset($modelsWhichSupportQuickCreate[$field->linkType])) {
                                 $htmlString .= '<span class="quick-create-button create-' . $field->linkType . '">+</span>';
                                 $quickCreateButtonTypes[] = $field->linkType;
                             }
                             if (!empty($field->help)) {
                                 $htmlString .= X2Html::hint($field->help);
                             }
                             $htmlString .= "</div>";
                         }
                     }
                     unset($item);
                     $htmlString .= '</div>';
                 }
             }
             $htmlString .= '</td>';
         }
     }
     unset($col);
     $htmlString .= '</tr>';
 }
 $htmlString .= '</table></div>';
Exemple #16
0
        <br/>
        <div class="row">
            <div class="cell">
                <?php 
echo $form->labelEx($model, 'doNotEmailLinkText', array('class' => 'left'));
echo '<br/>';
echo $form->textField($model, 'doNotEmailLinkText');
?>
            </div>
        </div>
        <br/>
        <div class="row">
            <div class="cell">
                <?php 
echo $form->labelEx($model, 'doNotEmailPage', array('class' => 'left'));
echo X2Html::hint(Yii::t('admin', 'This is the page that will be displayed to contacts after ' . 'they have clicked the "Do Not Email" link contained in an email.'), false, null, true);
echo $form->richTextarea($model, 'doNotEmailPage');
?>
            </div>
        </div>
        <br/><hr/>
        <br/>

        <?php 
//echo $form->labelEx($admin,'chatPollTime');
?>
        <?php 
// echo $form->textField($admin,'chatPollTime',array('id'=>'chatPollTime'));
?>

        <?php