Beispiel #1
0
 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:'******'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();
 }
Beispiel #2
0
 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();
 }