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


PHP js::ajaxFile方法代码示例

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


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

示例1: getMyProfile

 private function getMyProfile()
 {
     $pre = "<p>Your profile is used to determine how you get updates to your tickets, billing notifications as well as your picture that is shown for your ticket updates.</p>";
     $span = [];
     $fields = [];
     $fields[] = ['type' => 'ajax', 'id' => 'profilePicture', 'text' => 'Profile Picture:'];
     $fields[] = ['type' => 'password', 'var' => 'user_password', 'text' => 'Change Password:'];
     $fields[] = ['type' => 'input', 'text' => 'Cell Phone Number:', 'var' => 'user_sms', 'val' => $this->user->user_sms, 'class' => 'sms'];
     $opts = [];
     $opts[] = ['val' => $this->user->user_cansms, 'text' => $this->user->user_cansms ? "Yes" : 'No'];
     $opts[] = ['val' => $this->user->user_cansms, 'text' => '--------------'];
     $opts[] = ['val' => 'Y', 'text' => 'Yes'];
     $opts[] = ['val' => 'N', 'text' => 'No'];
     $fields[] = ['type' => 'select', 'var' => 'user_cansms', 'opts' => $opts, 'text' => 'Send Text Messages?', 'comment' => 'If set to Yes, you will be sent a text when tickets are updated or you are billed.'];
     $span[] = ['span' => 6, 'elements' => $fields];
     $fields = [];
     $fields[] = ['type' => 'input', 'text' => 'Other E-mail Addresses:', 'var' => 'user_altemails', 'val' => $this->user->user_altemails, 'comment' => "Enter any secondary email addresses separated by commas"];
     $span[] = ['span' => 6, 'elements' => $fields];
     $this->exportJS(js::maskInput('sms', '1-999-999-9999'));
     $this->exportJS(js::ajaxFile('profilePicture', "profilePic"));
     return $pre . form::init()->id('myProfileForm')->post('/')->spanelements($span)->render();
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:22,代码来源:core.inc.php

示例2: createUploadForm

 private function createUploadForm(&$ticket)
 {
     $pre = "<p>You can upload any type of file into the ticket. The file must not exceed 20MB in size. If you wish to upload a file larger than 20MB, please make prior arrangements to send to another e-mail address.</p>";
     $fields = [];
     $fields[] = ['type' => 'input', 'text' => 'Description:', 'var' => 'file_title'];
     $fields[] = ['type' => 'ajax', 'text' => 'Upload:', 'id' => 'uploadBlock'];
     $this->exportJS(js::ajaxFile('uploadBlock', "t_{$ticket['id']}"));
     return $pre . form::init()->post('/ticket/')->elements($fields)->id('newUploadForm')->render();
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:9,代码来源:ticket.php


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