当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_ThemeCommon::get_icon方法代码示例

本文整理汇总了PHP中Base_ThemeCommon::get_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_ThemeCommon::get_icon方法的具体用法?PHP Base_ThemeCommon::get_icon怎么用?PHP Base_ThemeCommon::get_icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_ThemeCommon的用法示例。


在下文中一共展示了Base_ThemeCommon::get_icon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: user_settings

 public static function user_settings()
 {
     if (Acl::is_user()) {
         $info = '%D - ' . __('Date') . '<br>%T - ' . __('Time') . '<br>%U - ' . __('User');
         $help = ' <img src="' . Base_ThemeCommon::get_icon('info') . '" ' . Utils_TooltipCommon::open_tag_attrs($info, false) . '/>';
         return array(__('Notes') => array(array('name' => 'editor', 'label' => __('Editor'), 'type' => 'select', 'default' => 0, 'values' => array(__('Simple'), __('Advanced'))), array('name' => 'edited_on_format', 'label' => __('Edited on format') . $help, 'type' => 'text', 'default' => '%D<br><br>%T<br><br>%U')));
     }
     return array();
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:9,代码来源:AttachmentCommon_0.php

示例2: register_form

 public function register_form($data = null)
 {
     if ($this->is_back()) {
         return false;
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $f = $this->init_module(Libs_QuickForm::module_name());
     $admin_email_tooltip = '<img ' . Utils_TooltipCommon::open_tag_attrs(__('This email will be used to send registation link and to contact Administator directly.'), false) . ' src="' . Base_ThemeCommon::get_icon('info') . '"/> ';
     $tax_id_tooltip = '<img ' . Utils_TooltipCommon::open_tag_attrs(__('Your company Tax ID for invoices.'), false) . ' src="' . Base_ThemeCommon::get_icon('info') . '"/> ';
     $f->addElement('text', 'company_name', __('Company Name'), array('maxlength' => 128));
     $f->addRule('company_name', __('Field required'), 'required');
     $f->addRule('company_name', __('Max length exceeded'), 'maxlength', 128);
     $f->addElement('text', 'short_name', __('Short Name'), array('maxlength' => 64));
     $f->addRule('short_name', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'phone', __('Phone'), array('maxlength' => 64));
     $f->addRule('phone', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'fax', __('Fax'), array('maxlength' => 64));
     $f->addRule('fax', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'email', __('Company email'), array('maxlength' => 128));
     $f->addRule('email', __('Max length exceeded'), 'maxlength', 128);
     $f->addRule('email', __('Invalid e-mail address'), 'email');
     $f->addElement('text', 'web_address', __('Web address'), array('maxlength' => 64));
     $f->addRule('web_address', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'address_1', __('Address 1'), array('maxlength' => 64));
     $f->addRule('address_1', __('Field required'), 'required');
     $f->addRule('address_1', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'address_2', __('Address 2'), array('maxlength' => 64));
     $f->addRule('address_2', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'city', __('City'), array('maxlength' => 64));
     $f->addRule('city', __('Field required'), 'required');
     $f->addRule('city', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('commondata', 'country', __('Country'), 'Countries');
     $f->addRule('country', __('Field required'), 'required');
     $f->addElement('commondata', 'zone', __('Zone'), array('Countries', 'country'), array('empty_option' => true));
     $f->addElement('text', 'postal_code', __('Postal Code'), array('maxlength' => 64));
     $f->addRule('postal_code', __('Field required'), 'required');
     $f->addRule('postal_code', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'tax_id', $tax_id_tooltip . __('Tax ID'), array('maxlength' => 64));
     $f->addRule('admin_email', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'admin_first_name', __('Administrator\'s first name'), array('maxlength' => 64));
     $f->addRule('admin_first_name', __('Field required'), 'required');
     $f->addRule('admin_first_name', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'admin_last_name', __('Administrator\'s last name'), array('maxlength' => 64));
     $f->addRule('admin_last_name', __('Field required'), 'required');
     $f->addRule('admin_last_name', __('Max length exceeded'), 'maxlength', 64);
     $f->addElement('text', 'admin_email', $admin_email_tooltip . __('Administrator\'s email'), array('maxlength' => 128));
     $f->addRule('admin_email', __('Field required'), 'required');
     $f->addRule('admin_email', __('Max length exceeded'), 'maxlength', 128);
     $f->addRule('admin_email', __('Invalid e-mail address'), 'email');
     if ($f->validate()) {
         $ret = $f->exportValues();
         $ret = Base_EssClientCommon::server()->register_installation_request($ret);
         if ($ret) {
             if (is_string($ret)) {
                 Base_EssClientCommon::set_license_key($ret);
             }
             location(array());
             return false;
         }
     }
     // set defaults
     print '<div class="important_notice">';
     print __('Enter Company and Administrator details. This data will be sent to EPESI Store Server to provide us with contact information. The data sent to EPESI Store Server is limited only to the data you enter using this form and what modules are being purchased and downloaded.');
     print '<br>';
     if ($data) {
         $f->setDefaults($data);
     } else {
         if (ModuleManager::is_installed('CRM_Contacts') > -1) {
             print '<span style="color:gray;font-size:10px;">' . __('Data below was auto-filled based on Main Company and first Super administrator. Make sure that the data is correct and change it if necessary.') . '</span>';
             $defaults = Base_EssClientCommon::get_possible_admin();
             $mc = CRM_ContactsCommon::get_main_company();
             if ($mc > 0) {
                 $company = CRM_ContactsCommon::get_company($mc);
                 if ($company) {
                     $defaults = array_merge($company, $defaults);
                 }
             }
             $f->setDefaults($defaults);
         }
     }
     if ($data) {
         if (isset($data['status']) && strcasecmp($data['status'], 'Confirmed') == 0) {
             print '<div style="color:gray;font-size:10px;">' . __('Updating Company data will require re-validation by our representative.') . '</div>';
         }
         print '<div style="color:red;font-size:10px;">' . __('Changing Administrator e-mail address will require e-mail confirmation.') . '</div>';
     }
     print '<center>';
     $f->addElement('submit', 'submit', $data ? __('Update') : __('Register'));
     $f->display_as_column();
     print '</center>';
     print '</div>';
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:93,代码来源:EssClient_0.php

示例3: view_field


//.........这里部分代码省略.........
         $this->admin_field_type = $row['select_data_type'];
         $this->admin_field = $row;
     } else {
         $selected_data = $form->exportValue('select_data_type');
         $form->setDefaults(array('visible' => 1, 'autonumber_prefix' => '#', 'autonumber_pad_length' => '6', 'autonumber_pad_mask' => '0'));
     }
     $this->admin_field_mode = $action;
     $this->admin_field_name = $field;
     $form->addElement('select', 'select_data_type', __('Data Type'), $data_type, array('id' => 'select_data_type', 'onchange' => 'RB_hide_form_fields()'));
     $form->addElement('text', 'text_length', __('Maximum Length'), array('id' => 'length'));
     $minute_increment_values = array(1 => 1, 2 => 2, 5 => 5, 10 => 10, 15 => 15, 20 => 20, 30 => 30, 60 => __('Full hours'));
     $form->addElement('select', 'minute_increment', __('Minutes Interval'), $minute_increment_values, array('id' => 'minute_increment'));
     $form->addElement('select', 'data_source', __('Source of Data'), array('rset' => __('Recordset'), 'commondata' => __('CommonData')), array('id' => 'data_source', 'onchange' => 'RB_hide_form_fields()'));
     $form->addElement('select', 'select_type', __('Type'), array('select' => __('Single value selection'), 'multiselect' => __('Multiple values selection')), array('id' => 'select_type'));
     $form->addElement('select', 'order_by', __('Order by'), array('key' => __('Key'), 'value' => __('Value'), 'position' => __('Position')), array('id' => 'order_by'));
     $form->addElement('text', 'commondata_table', __('CommonData table'), array('id' => 'commondata_table'));
     $tables = Utils_RecordBrowserCommon::list_installed_recordsets();
     asort($tables);
     $form->addElement('multiselect', 'rset', '<span id="rset_label">' . __('Recordset') . '</span>', $tables, array('id' => 'rset'));
     $form->addElement('text', 'label_field', __('Related field(s)'), array('id' => 'label_field'));
     $form->addFormRule(array($this, 'check_field_definitions'));
     $form->addElement('checkbox', 'visible', __('Table view'));
     $form->addElement('checkbox', 'tooltip', __('Tooltip view'));
     $form->addElement('checkbox', 'required', __('Required'), null, array('id' => 'required'));
     $form->addElement('checkbox', 'filter', __('Filter enabled'), null, array('id' => 'filter'));
     $form->addElement('checkbox', 'export', __('Export'));
     $form->addElement('text', 'autonumber_prefix', __('Prefix string'), array('id' => 'autonumber_prefix'));
     $form->addRule('autonumber_prefix', __('Double underscore is not allowed'), 'callback', array('Utils_RecordBrowser', 'qf_rule_without_double_underscore'));
     $form->addElement('text', 'autonumber_pad_length', __('Pad length'), array('id' => 'autonumber_pad_length'));
     $form->addRule('autonumber_pad_length', __('Only integer numbers are allowed.'), 'regex', '/^[0-9]*$/');
     $form->addElement('text', 'autonumber_pad_mask', __('Pad character'), array('id' => 'autonumber_pad_mask'));
     $form->addRule('autonumber_pad_mask', __('Double underscore is not allowed'), 'callback', array('Utils_RecordBrowser', 'qf_rule_without_double_underscore'));
     $form->addElement('checkbox', 'advanced', __('Edit advanced properties'), null, array('onchange' => 'RB_advanced_settings()', 'id' => 'advanced'));
     $icon = '<img src="' . Base_ThemeCommon::get_icon('info') . '" alt="info">';
     $txt = '<ul><li>&lt;Class name&gt;::&ltmethod name&gt</li><li>&ltfunction name&gt</li><li>PHP:<br />- $record (array)<br />- $links_not_recommended (bool)<br />- $field (array)<br />return "value to display";</li></ul>';
     $form->addElement('textarea', 'display_callback', __('Value display function') . Utils_TooltipCommon::create($icon, $txt, false), array('maxlength' => 255, 'style' => 'width:97%', 'id' => 'display_callback'));
     $txt = '<ul><li>&lt;Class name&gt;::&ltmethod name&gt</li><li>&ltfunction name&gt</li><li>PHP:<br />- $form (QuickForm object)<br />- $field (string)<br />- $label (string)<br />- $mode (string)<br />- $default (mixed)<br />- $desc (array)<br />- $rb_obj (RB object)<br />- $display_callback_table (array)</li></ul>';
     $form->addElement('textarea', 'QFfield_callback', __('Field generator function') . Utils_TooltipCommon::create($icon, $txt, false), array('maxlength' => 255, 'style' => 'width:97%', 'id' => 'QFfield_callback'));
     if ($action == 'edit') {
         $form->freeze('field');
         $form->freeze('select_data_type');
         $form->freeze('data_source');
         $form->freeze('rset');
     }
     if ($action == 'edit') {
         $display_callbacback = DB::GetOne('SELECT callback FROM ' . $this->tab . '_callback WHERE freezed=1 AND field=%s', array($field));
         $QFfield_callbacback = DB::GetOne('SELECT callback FROM ' . $this->tab . '_callback WHERE freezed=0 AND field=%s', array($field));
         $form->setDefaults(array('display_callback' => $display_callbacback));
         $form->setDefaults(array('QFfield_callback' => $QFfield_callbacback));
     }
     if ($form->validate()) {
         $data = $form->exportValues();
         $data['caption'] = trim($data['caption']);
         $data['field'] = trim($data['field']);
         $type = DB::GetOne('SELECT type FROM ' . $this->tab . '_field WHERE field=%s', array($field));
         if (!isset($data['select_data_type'])) {
             $data['select_data_type'] = $type;
         }
         if ($action == 'add') {
             $field = $data['field'];
         }
         $id = preg_replace('/[^a-z0-9]/', '_', strtolower($field));
         $new_id = preg_replace('/[^a-z0-9]/', '_', strtolower($data['field']));
         if (preg_match('/^[a-z0-9_]*$/', $id) == 0) {
             trigger_error('Invalid column name: ' . $field);
         }
开发者ID:cretzu89,项目名称:EPESI,代码行数:67,代码来源:RecordBrowser_0.php


注:本文中的Base_ThemeCommon::get_icon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。