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


PHP js::maskInput方法代码示例

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


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

 public function showClient($content)
 {
     $id = $content['showClient'];
     $company = $this->query("SELECT * from companies WHERE id='{$id}'")[0];
     $user = $this->query("SELECT * from users WHERE company_id='{$company['id']}'")[0];
     // Going to pretty much copy the end-user signup form. (and change our postvars)
     $elements = [];
     $elements[] = ['type' => 'input', 'var' => 'user_name', 'text' => 'Full Name:', 'comment' => 'Main contact for account', 'val' => $user['user_name']];
     $elements[] = ['type' => 'input', 'var' => 'user_email', 'text' => 'E-mail Address:', 'comment' => 'Also your login to this system', 'val' => $user['user_email']];
     $elements[] = ['type' => 'password', 'var' => 'user_password', 'text' => 'Password:'];
     $elements[] = ['type' => 'input', 'var' => 'user_phone', 'text' => 'Phone Number (and Extension):', 'comment' => 'xxx.xxx.xxxx ext. xxx', 'val' => $user['user_phone']];
     $elements[] = ['type' => 'input', 'var' => 'user_title', 'text' => 'Title:', 'comment' => 'Leave blank if individual', 'val' => $user['user_title']];
     $span = [];
     $span[] = ['span' => 6, 'elements' => $elements];
     $elements = [];
     $elements[] = ['type' => 'input', 'var' => 'company_name', 'text' => 'Company Name:', 'comment' => 'If individual leave this blank', 'val' => $company['company_name']];
     $elements[] = ['type' => 'input', 'var' => 'company_address', 'text' => 'Address:', 'comment' => 'Where to mail invoices if required?', 'val' => $company['company_address']];
     $elements[] = ['type' => 'input', 'var' => 'company_address2', 'text' => 'Address Line 2:', 'comment' => 'Suite, etc.', 'val' => $company['company_address2']];
     $elements[] = ['type' => 'input', 'var' => 'company_city', 'text' => 'City:', 'val' => $company['company_city']];
     $elements[] = ['type' => 'input', 'var' => 'company_state', 'text' => 'State:', 'class' => 'state', 'val' => $company['company_state']];
     $elements[] = ['type' => 'input', 'var' => 'company_zip', 'text' => 'Zip:', 'val' => $company['company_zip']];
     $span[] = ['span' => 6, 'elements' => $elements];
     $form = form::init()->spanElements($span)->id('editAccount')->post('/clients/')->render();
     $button = button::init()->formid('editAccount')->text('Edit Account')->addStyle('post')->addStyle('btn-primary')->icon('fire')->message('Modifying Account..')->postVar('editAccount')->id($company['id'])->render();
     $save = "<div class='pull-right'>{$button}</div>";
     $data .= widget::init()->icon('share-alt')->span(12)->header('Account Details')->content($form)->footer($save)->render();
     $this->exportJS(js::maskInput('state', "**"));
     $this->export($data);
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:29,代码来源:clients.php

示例3: ccUpdateForm

 private function ccUpdateForm(&$ticket)
 {
     $cid = $ticket['company_id'];
     $this->exportJS(js::stripeToken($this->getSetting('stripe_publish'), 'savecc'));
     $span = [];
     $fields = [];
     $fields[] = array('type' => 'input', 'text' => 'Name on Card', 'val' => null, 'var' => null, 'class' => 'card-name');
     $fields[] = array('type' => 'input', 'text' => 'Card Number', 'val' => null, 'var' => null, 'class' => 'card-number');
     $fields[] = array('type' => 'input', 'text' => 'CVC', 'labelnote' => '3 digits', 'val' => null, 'var' => null, 'comment' => 'Enter 3 or 4 digit code on back of your card', 'class' => 'card-cvc');
     $span[] = ['span' => 6, 'elements' => $fields];
     $fields = [];
     $fields[] = array('type' => 'input', 'text' => 'Expiration Month', 'val' => null, 'var' => null, 'comment' => 'Expiration Month in Two Digits', 'class' => 'card-expiry-month');
     $fields[] = array('type' => 'input', 'text' => 'Expiration Year', 'val' => null, 'var' => null, 'comment' => 'Expiration Year in Four Digits', 'class' => 'card-expiry-year');
     $fields[] = array('type' => 'input', 'text' => 'Billing Zip Code', 'val' => null, 'var' => null, 'class' => 'card-zip');
     $fields[] = ['type' => 'hidden', 'var' => 'cid', 'val' => $ticket['company_id']];
     $fields[] = ['type' => 'hidden', 'var' => 'tid', 'val' => $ticket['id']];
     $span[] = ['span' => 6, 'elements' => $fields];
     // Mask Inputs
     $this->exportJs(js::maskInput('card-expiry-month', "99"));
     $this->exportJs(js::maskInput('card-zip', "99999"));
     $this->exportJs(js::maskInput('card-expiry-year', "9999"));
     $form = form::init()->id('payment-form')->post('/ticket/')->spanElements($span)->render();
     $pre = "<p>You are about to add or update your billing information. <b>This will not charge your credit card</b>. This is merely updating our merchant with your new card details.</p>";
     return $pre . $form;
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:25,代码来源:ticket.php

示例4: dwollaCreateForm

 private function dwollaCreateForm()
 {
     $first = reset(explode(" ", $this->user->user_name));
     $last = end(explode(" ", $this->user->user_name));
     $span = [];
     $fields = [];
     $fields[] = ['type' => 'input', 'text' => 'E-mail Address', 'var' => 'd_email', 'val' => $this->user->user_email];
     $fields[] = ['type' => 'password', 'text' => 'New Password:', 'var' => 'd_password', 'comment' => 'Dwolla <b>REQUIRES</b> a Capital Letter and a Number In the Password'];
     $fields[] = ['type' => 'input', 'text' => '4 Digit PIN:', 'comment' => 'This PIN will authorize transactions', 'class' => 'pin', 'var' => 'd_pin'];
     $fields[] = ['type' => 'input', 'text' => 'First Name:', 'var' => 'd_first', 'val' => $first];
     $fields[] = ['type' => 'input', 'text' => 'Last Name:', 'var' => 'd_last', 'val' => $last];
     $span[] = ['span' => 4, 'elements' => $fields];
     $fields = [];
     $fields[] = ['type' => 'input', 'text' => 'Address Line 1:', 'var' => 'd_address1', 'val' => $this->company->company_address];
     $fields[] = ['type' => 'input', 'text' => 'Address Line 2:', 'var' => 'd_address2', 'val' => $this->company->company_address2];
     $fields[] = ['type' => 'input', 'text' => 'City:', 'var' => 'd_city', 'val' => $this->company->company_city];
     $fields[] = ['type' => 'input', 'text' => 'State:', 'var' => 'd_state', 'val' => $this->company->company_state];
     $fields[] = ['type' => 'input', 'text' => 'Zip:', 'var' => 'd_zip', 'val' => $this->company->company_zip];
     $fields[] = ['type' => 'input', 'text' => 'Phone:', 'var' => 'd_phone', 'val' => $this->company->company_phone];
     $span[] = ['span' => 4, 'elements' => $fields];
     $fields = [];
     $fields[] = ['type' => 'input', 'text' => 'Date of Birth:', 'var' => 'd_dob', 'class' => 'dob'];
     $opts = [['val' => 'Personal', 'text' => 'Personal Account'], ['val' => 'Commercial', 'text' => 'Commercial Account'], ['val' => 'NonProfit', 'text' => 'Non-Profit Account']];
     $fields[] = ['type' => 'select', 'var' => 'd_type', 'opts' => $opts, 'text' => 'Type of Account:'];
     $fields[] = ['type' => 'input', 'var' => 'd_org', 'text' => 'Company/Organization Name:', 'val' => $this->company->company_name];
     $fields[] = ['type' => 'input', 'var' => 'd_ein', 'text' => 'EIN (If Applicable):'];
     $opts = [['val' => 'N', 'text' => 'No'], ['val' => 'Y', 'text' => 'Yes']];
     $fields[] = ['type' => 'select', 'var' => 'd_terms', 'text' => 'Agree to Terms and Conditions?:', 'opts' => $opts];
     $span[] = ['span' => 4, 'elements' => $fields];
     $fields = [];
     $this->exportJS(js::maskInput('pin', '9999'));
     $this->exportJS(js::maskInput('dob', '99-99-9999'));
     $data = form::init()->id('dwollaCreateForm')->spanElements($span)->post('/billing/')->render();
     $data .= "<div class='well'><h4>Dwolla Terms of Service</h4>\n\t\t\t\t<p>You must read and agree to the rules set forth at <a target='_blank' href='https://www.dwolla.com/tos'>https://www.dwolla.com/tos</a> before continuing. This will open in a new window.</p></div>\n\t\t\t\t";
     return $data;
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:36,代码来源:billing.php


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