本文整理汇总了PHP中RSFormProHelper::loadCodeMirror方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::loadCodeMirror方法的具体用法?PHP RSFormProHelper::loadCodeMirror怎么用?PHP RSFormProHelper::loadCodeMirror使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RSFormProHelper
的用法示例。
在下文中一共展示了RSFormProHelper::loadCodeMirror方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
// set title
JToolBarHelper::title('RSForm! Pro', 'rsform');
// adding the toolbar on 2.5
if (!RSFormProHelper::isJ('3.0')) {
$this->addToolbar();
}
$layout = strtolower($this->getLayout());
if ($layout == 'edit') {
JToolBarHelper::apply('directory.apply');
JToolBarHelper::save('directory.save');
JToolBarHelper::cancel('directory.cancel');
$backIcon = RSFormProHelper::isJ('3.0') ? 'previous' : 'back';
JToolBarHelper::custom('directory.cancelform', $backIcon, $backIcon, JText::_('RSFP_BACK_TO_FORM'), false);
RSFormProHelper::loadCodeMirror();
$this->directory = $this->get('Directory');
$this->formId = JRequest::getInt('formId', 0);
$this->tab = JRequest::getInt('tab', 0);
$this->emails = $this->get('emails');
$this->fields = RSFormProHelper::getDirectoryFields($this->formId);
$this->quickfields = $this->get('QuickFields');
$lists['ViewLayoutAutogenerate'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[ViewLayoutAutogenerate]', 'onclick="changeDirectoryAutoGenerateLayout(' . $this->formId . ', this.value);"', $this->directory->ViewLayoutAutogenerate);
$lists['enablepdf'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[enablepdf]', '', $this->directory->enablepdf);
$lists['enablecsv'] = RSFormProHelper::renderHTML('select.booleanlist', 'jform[enablecsv]', '', $this->directory->enablecsv);
$this->lists = $lists;
} elseif ($layout == 'edit_emails') {
$this->emails = $this->get('emails');
} else {
$this->addToolbar();
JToolBarHelper::title(JText::_('RSFP_SUBM_DIR'), 'rsform');
JToolbarHelper::deleteList('', 'directory.remove');
$this->sidebar = $this->get('Sidebar');
$this->forms = $this->get('forms');
$this->pagination = $this->get('pagination');
$this->sortColumn = $this->get('sortColumn');
$this->sortOrder = $this->get('sortOrder');
}
parent::display($tpl);
}
示例2: display
public function display($tpl = null)
{
$mainframe = JFactory::getApplication();
$document = JFactory::getDocument();
$document->addCustomTag('<!--[if IE 7]><link href="' . JURI::root() . 'administrator/components/com_rsform/assets/css/styleie.css" rel="stylesheet" type="text/css" /><![endif]-->');
RSFormProHelper::loadCodeMirror();
JToolBarHelper::title('RSForm! Pro', 'rsform');
// adding the toolbar on 2.5
if (!RSFormProHelper::isJ('3.0')) {
$this->addToolbar();
}
$layout = $this->getLayout();
$this->isComponent = JRequest::getVar('tmpl') == 'component';
$this->tooltipClass = RSFormPRoHelper::getTooltipClass();
if ($layout == 'edit') {
$submissionsIcon = RSFormProHelper::isJ('3.0') ? 'database' : 'forward';
$previewIcon = RSFormProHelper::isJ('3.0') ? 'new tab' : 'preview';
$directoryIcon = RSFormProHelper::isJ('3.0') ? 'folder' : 'forward';
JToolBarHelper::apply('forms.apply');
JToolBarHelper::save('forms.save');
JToolBarHelper::spacer();
JToolBarHelper::custom('forms.preview', $previewIcon, $previewIcon, JText::_('JGLOBAL_PREVIEW'), false);
JToolBarHelper::custom('submissions.back', $submissionsIcon, $submissionsIcon, JText::_('RSFP_SUBMISSIONS'), false);
JToolBarHelper::custom('forms.directory', $directoryIcon, $directoryIcon, JText::_('RSFP_DIRECTORY'), false);
JToolBarHelper::custom('components.copy', 'copy', 'copy', JText::_('RSFP_COPY_TO_FORM'), false);
JToolBarHelper::custom('components.duplicate', 'copy', 'copy', JText::_('RSFP_DUPLICATE'), false);
JToolBarHelper::deleteList(JText::_('RSFP_ARE_YOU_SURE_DELETE'), 'components.remove', JText::_('JTOOLBAR_DELETE'));
JToolBarHelper::publishList('components.publish', JText::_('JTOOLBAR_PUBLISH'));
JToolBarHelper::unpublishList('components.unpublish', JText::_('JTOOLBAR_UNPUBLISH'));
JToolBarHelper::spacer();
JToolBarHelper::cancel('forms.cancel');
$this->tabposition = JRequest::getInt('tabposition', 0);
$this->tab = JRequest::getInt('tab', 0);
$this->form = $this->get('form');
$this->form_post = $this->get('formPost');
$this->hasSubmitButton = $this->get('hasSubmitButton');
JToolBarHelper::title('RSForm! Pro <small>[' . JText::sprintf('RSFP_EDITING_FORM', $this->form->FormTitle) . ']</small>', 'rsform');
$lists['Published'] = $this->renderHTML('select.booleanlist', 'Published', '', $this->form->Published);
$lists['ShowFormTitle'] = $this->renderHTML('select.booleanlist', 'ShowFormTitle', '', $this->form->ShowFormTitle);
$lists['keepdata'] = $this->renderHTML('select.booleanlist', 'Keepdata', '', $this->form->Keepdata);
$lists['confirmsubmission'] = $this->renderHTML('select.booleanlist', 'ConfirmSubmission', '', $this->form->ConfirmSubmission);
$lists['ShowThankyou'] = $this->renderHTML('select.booleanlist', 'ShowThankyou', 'onclick="enableThankyou(this.value);"', $this->form->ShowThankyou);
$lists['ShowContinue'] = $this->renderHTML('select.booleanlist', 'ShowContinue', !$this->form->ShowThankyou ? 'disabled="true"' : '', $this->form->ShowContinue);
$lists['UserEmailMode'] = $this->renderHTML('select.booleanlist', 'UserEmailMode', 'onclick="enableEmailMode(\'User\', this.value)"', $this->form->UserEmailMode, JText::_('HTML'), JText::_('RSFP_COMP_FIELD_TEXT'));
$lists['UserEmailAttach'] = $this->renderHTML('select.booleanlist', 'UserEmailAttach', 'onclick="enableAttachFile(this.value)"', $this->form->UserEmailAttach);
$lists['AdminEmailMode'] = $this->renderHTML('select.booleanlist', 'AdminEmailMode', 'onclick="enableEmailMode(\'Admin\', this.value)"', $this->form->AdminEmailMode, JText::_('HTML'), JText::_('RSFP_COMP_FIELD_TEXT'));
$lists['MetaTitle'] = $this->renderHTML('select.booleanlist', 'MetaTitle', '', $this->form->MetaTitle);
$lists['TextareaNewLines'] = $this->renderHTML('select.booleanlist', 'TextareaNewLines', '', $this->form->TextareaNewLines);
$lists['AjaxValidation'] = $this->renderHTML('select.booleanlist', 'AjaxValidation', '', $this->form->AjaxValidation);
$lists['FormLayoutAutogenerate'] = $this->renderHTML('select.booleanlist', 'FormLayoutAutogenerate', 'onclick="changeFormAutoGenerateLayout(' . $this->form->FormId . ', this.value);"', $this->form->FormLayoutAutogenerate);
$lists['post_enabled'] = $this->renderHTML('select.booleanlist', 'form_post[enabled]', '', $this->form_post->enabled);
$lists['post_method'] = $this->renderHTML('select.booleanlist', 'form_post[method]', '', $this->form_post->method, JText::_('RSFP_POST_METHOD_POST'), JText::_('RSFP_POST_METHOD_GET'));
$lists['post_silent'] = $this->renderHTML('select.booleanlist', 'form_post[silent]', '', $this->form_post->silent);
$this->themes = $this->get('themes');
$this->lang = $this->get('lang');
// workaround for first time visit
$session = JFactory::getSession();
$session->set('com_rsform.form.' . $this->form->FormId . '.lang', $this->lang);
$this->fields = $this->get('fields');
$this->totalFields = $this->get('totalfields');
$this->quickfields = $this->get('quickfields');
$this->pagination = $this->get('fieldspagination');
$this->calculations = RSFormProHelper::getCalculations($this->form->FormId);
$lists['Languages'] = JHTML::_('select.genericlist', $this->get('languages'), 'Language', 'onchange="submitbutton(\'changeLanguage\')"', 'value', 'text', $this->lang);
$lists['totalFields'] = JHTML::_('select.genericlist', $this->get('languages'), 'Language', 'onchange="submitbutton(\'changeLanguage\')"', 'value', 'text', $this->lang);
$this->mappings = $this->get('mappings');
$this->mpagination = $this->get('mpagination');
$this->conditions = $this->get('conditions');
$this->formId = $this->form->FormId;
$this->emails = $this->get('emails');
$this->lists = $lists;
} elseif ($layout == 'new') {
$nextIcon = RSFormProHelper::isJ('3.0') ? 'next' : 'forward';
JToolBarHelper::custom('forms.new.steptwo', $nextIcon, $nextIcon, JText::_('JNEXT'), false);
JToolBarHelper::cancel('forms.cancel');
} elseif ($layout == 'new2') {
$nextIcon = RSFormProHelper::isJ('3.0') ? 'next' : 'forward';
JToolBarHelper::custom('forms.new.stepthree', $nextIcon, $nextIcon, JText::_('JNEXT'), false);
JToolBarHelper::cancel('forms.cancel');
$lists['AdminEmail'] = $this->renderHTML('select.booleanlist', 'AdminEmail', 'onclick="changeAdminEmail(this.value)"', 1);
$lists['UserEmail'] = $this->renderHTML('select.booleanlist', 'UserEmail', '', 1);
$actions = array(JHTML::_('select.option', 'refresh', JText::_('RSFP_SUBMISSION_REFRESH_PAGE')), JHTML::_('select.option', 'thankyou', JText::_('RSFP_SUBMISSION_THANKYOU')), JHTML::_('select.option', 'redirect', JText::_('RSFP_SUBMISSION_REDIRECT_TO')));
$lists['SubmissionAction'] = JHTML::_('select.genericlist', $actions, 'SubmissionAction', 'onclick="changeSubmissionAction(this.value)"');
$this->adminEmail = $this->get('adminEmail');
$this->lists = $lists;
$this->editor = JFactory::getEditor();
} elseif ($layout == 'new3') {
$nextIcon = RSFormProHelper::isJ('3.0') ? 'next' : 'forward';
JToolBarHelper::custom('forms.new.stepfinal', $nextIcon, $nextIcon, JText::_('RSFP_FINISH'), false);
JToolBarHelper::cancel('forms.cancel');
$lists['predefinedForms'] = JHTML::_('select.genericlist', $this->get('predefinedforms'), 'predefinedForm', '');
$this->lists = $lists;
} elseif ($layout == 'component_copy') {
JToolBarHelper::custom('components.copy.process', 'copy', 'copy', JText::_('RSFP_COPY'), false);
JToolBarHelper::cancel('components.copy.cancel');
$formlist = $this->get('formlist');
$lists['forms'] = JHTML::_('select.genericlist', $formlist, 'toFormId', '', 'value', 'text');
$this->formId = JRequest::getInt('formId');
$this->cids = JRequest::getVar('cid', array());
$this->lists = $lists;
//.........这里部分代码省略.........