本文整理汇总了PHP中Zend_Dojo_Form_Element_TextBox类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo_Form_Element_TextBox类的具体用法?PHP Zend_Dojo_Form_Element_TextBox怎么用?PHP Zend_Dojo_Form_Element_TextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Dojo_Form_Element_TextBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'application-new'));
$this->setMethod('post');
// name
$name = new Zend_Dojo_Form_Element_TextBox('name');
$name->setLabel(__('Name'));
$name->setRequired(true);
$this->addElement($name);
// description
$description = new Zend_Dojo_Form_Element_Textarea('description');
$description->setLabel(__('Description'));
$description->setAttrib('rows', '5');
$description->setAttrib('cols', '60');
$this->addElement($description);
// url
$url = new Zend_Dojo_Form_Element_TextBox('url');
$url->setLabel(__('URL'));
$url->setRequired(true);
$this->addElement($url);
// privacy
$privacy = new Zend_Dojo_Form_Element_ComboBox('privacy');
$privacy->setLabel(__('Privacy'));
$privacy->setRequired(true);
$privacy->addMultiOptions(array('private' => __('Private: users cannot follow this application'), 'public' => __('Public: users can follow this application')));
$privacy->setValue('public');
$this->addElement($privacy);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}
示例2: FrmAddZone
public function FrmAddZone($_data = null)
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("SEARCH_ZONE_INFO")));
$_title->setValue($request->getParam("adv_search"));
$_status_search = new Zend_Dojo_Form_Element_FilteringSelect('search_status');
$_status_search->setAttribs(array('dojoType' => $this->filter));
$_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status_search->setMultiOptions($_status_opt);
$_status_search->setValue($request->getParam("search_status"));
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
$_zone = new Zend_Dojo_Form_Element_TextBox('zone_name');
$_zone->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
// $_stu= new Zend_Dojo_Form_Element_TextBox('zone_student');
// $_stu->setAttribs(array('dojoType'=>$this->tvalidate,'required'=>'true','class'=>'fullside',));
$_zone_number = new Zend_Dojo_Form_Element_TextBox('zone_number');
$_zone_number->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_id = new Zend_Form_Element_Hidden('id');
if (!empty($_data)) {
$_id->setValue($_data['zone_id']);
$_zone->setValue($_data['zone_name']);
$_zone_number->setValue($_data['zone_num']);
$_status->setValue($_data['status']);
}
$this->addElements(array($_btn_search, $_status_search, $_title, $_id, $_zone, $_status, $_id, $_zone_number));
return $this;
}
示例3: FrmWhereHouse
public function FrmWhereHouse($data = null)
{
$menu_code = new Zend_Form_Element_Text('where_house_id');
$menu_code->setAttribs(array('class' => 'form-control'));
$description = new Zend_Form_Element_Text('description');
$description->setAttribs(array('class' => 'form-control'));
$second_language = new Zend_Form_Element_Text('second_language');
$second_language->setAttribs(array('class' => 'form-control'));
$address1 = new Zend_Dojo_Form_Element_TextBox('address1');
$address1->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'checked' => 'checked', 'class' => 'form-control'));
$address2 = new Zend_Dojo_Form_Element_TextBox('address2');
$address2->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'checked' => 'checked', 'class' => 'form-control'));
$phone = new Zend_Dojo_Form_Element_TextBox('phone');
$phone->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'checked' => 'checked', 'class' => 'form-control'));
$fax = new Zend_Dojo_Form_Element_TextBox('fax');
$fax->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'checked' => 'checked', 'class' => 'form-control'));
if ($data != null) {
// print_r($data);
}
$show_description = new Zend_Dojo_Form_Element_FilteringSelect('location_type');
$show_description->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'class' => 'form-control'));
$description_opt = array("" => $this->tr->translate("LOCATION_TYPE"));
$show_description->setMultiOptions($description_opt);
$photo = new Zend_Form_Element_File('photo');
$background = new Zend_Form_Element_Text('background');
$background->setAttribs(array('class' => 'form-control color-picker-rgba'));
$note = new Zend_Dojo_Form_Element_Textarea('note');
$note->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'checked' => 'checked', 'class' => 'form-control'));
$this->addElements(array($menu_code, $description, $second_language, $address1, $address2, $phone, $fax, $show_description, $background, $note));
return $this;
}
示例4: FrmAddSchool
public function FrmAddSchool($data = null)
{
$_classname = new Zend_Dojo_Form_Element_TextBox('schoolname');
$_classname->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
$_province->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_db = new Application_Model_DbTable_DbGlobal();
$rows_school = $_db->getGlobalDb("SELECT province_id,province_en_name FROM rms_province ");
$opt_school = "";
if (!empty($rows_school)) {
foreach ($rows_school as $row) {
$opt_school[$row['province_id']] = $row['province_en_name'];
}
}
$_province->setMultiOptions($opt_school);
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 2 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$_submit->setLabel("save");
$id = new Zend_Form_Element_Hidden('id');
if (!empty($data)) {
$_classname->setValue($data['school_name']);
$_status->setValue($data['status']);
$_province->setValue($data['province_id']);
$id->setValue($data['id']);
}
$this->addElements(array($_classname, $_status, $_submit, $_province, $id));
return $this;
}
示例5: addMoney
public function addMoney()
{
/* Form Elements & Other Definitions Here ... */
$nuber_account = new Zend_Dojo_Form_Element_NumberTextBox('nuber_account');
$nuber_account->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$namecustomer = new Zend_Dojo_Form_Element_TextBox('namecustomer');
$namecustomer->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$phone = new Zend_Dojo_Form_Element_NumberTextBox('phone');
$phone->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$note = new Zend_Dojo_Form_Element_NumberTextBox('note');
$note->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$dola1 = new Zend_Dojo_Form_Element_NumberTextBox('$dola1');
$dola1->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$dola2 = new Zend_Dojo_Form_Element_NumberTextBox('$dola2');
$dola2->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$dola3 = new Zend_Dojo_Form_Element_NumberTextBox('$dola3');
$dola3->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$bath1 = new Zend_Dojo_Form_Element_NumberTextBox('bath1');
$bath1->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$bath2 = new Zend_Dojo_Form_Element_NumberTextBox('bath2');
$bath2->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$bath3 = new Zend_Dojo_Form_Element_NumberTextBox('bath3');
$bath3->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$real1 = new Zend_Dojo_Form_Element_NumberTextBox('real1');
$real1->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$real2 = new Zend_Dojo_Form_Element_NumberTextBox('real2');
$real2->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
$real3 = new Zend_Dojo_Form_Element_NumberTextBox('real3');
$real3->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside'));
// $typecash1=array(1=>"ដុល្លា",2=>"បាត",3=>"រៀល");
// $typecash->setMultiOptions($typecash1);
$this->addElements(array($nuber_account, $namecustomer, $phone, $note, $dola1, $dola2, $dola3, $bath1, $bath2, $bath3, $real1, $real2, $real3));
return $this;
}
示例6: FrmCategory
public function FrmCategory($data = null)
{
$db = new Product_Model_DbTable_DbCategory();
$row = $db->getCategory();
$name = new Zend_Dojo_Form_Element_TextBox('name');
$name->setAttribs(array('dojoType' => $this->text, 'class' => 'fullside'));
$parent = new Zend_Dojo_Form_Element_FilteringSelect('parent');
$parent->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$opt_parent = array('0' => $this->tr->translate("SELECT"));
if ($row) {
foreach ($row as $rs) {
$opt_parent[$rs["id"]] = $rs["name"];
}
}
$parent->setMultiOptions($opt_parent);
$opt_statu = array(1 => $this->tr->translate("Active"), 0 => $this->tr->translate("Deactve"));
$status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$status->setMultiOptions($opt_statu);
$this->addElements(array($name, $parent, $status));
if ($data) {
$parent->setValue($data["parent_id"]);
$name->setValue($data["name"]);
$status->setValue($data["status"]);
}
return $this;
}
示例7: __construct
public function __construct()
{
parent::__construct();
$router = new Shared_Controller_Router();
$this->setAction($router->assemble(array(), 'login'));
$this->setMethod('post');
// email
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setLabel(__('Email'));
$email->setRequired(true);
$this->addElement($email);
// password
$password = new Zend_Dojo_Form_Element_PasswordTextBox('password');
$password->setLabel(__('Password'));
$password->setRequired(true);
$this->addElement($password);
// remember
$remember = new Zend_Dojo_Form_Element_CheckBox('remember');
$remember->setLabel(__('Remember me on this computer'));
$remember->setCheckedValue('yes');
$remember->setUncheckedValue('no');
$remember->setChecked(true);
$this->addElement($remember);
// submit
$submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$submit->setLabel(__('Submit'));
$this->addElement($submit);
}
示例8: frmSender
public function frmSender($data)
{
$sender = new Zend_Dojo_Form_Element_ValidationTextBox('sender_name');
$sender->setAttribs(array("required" => true, "class" => "fullside", "dojoType" => "dijit.form.ValidationTextBox"));
$sender_tel = new Zend_Dojo_Form_Element_NumberTextBox('tel');
$sender_tel->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.ValidationTextBox"));
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.TextBox"));
$address = new Zend_Dojo_Form_Element_TextBox('address');
$address->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.TextBox"));
$status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$status->setAttribs(array("class" => "fullside", "dojoType" => "dijit.form.FilteringSelect", "required" => true));
$_opt = array(1 => "ប្រើប្រាស់", 0 => "មិនប្រើប្រាស់");
$status->setMultiOptions($_opt);
$sender_id = new Zend_Form_Element_Hidden('id');
if (!empty($data)) {
$sender_id->setValue($data['sender_id']);
$sender->setValue($data['sender_name']);
$sender_tel->setValue($data['tel']);
$email->setValue($data['email']);
$address->setValue($data['address']);
$status->setValue($data['status']);
//print_r($data);
}
$this->addElements(array($sender, $sender_tel, $email, $address, $sender_id, $status));
return $this;
}
示例9: addBorrow
public function addBorrow()
{
/* Form Elements & Other Definitions Here ... */
$borrower = new Zend_Dojo_Form_Element_FilteringSelect('borrower');
$borrower->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
$borrow_dollar = new Zend_Dojo_Form_Element_TextBox('borrow_dollar');
$borrow_dollar->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$interest_dollar = new Zend_Dojo_Form_Element_TextBox('interest_dollar');
$interest_dollar->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$phone_number = new Zend_Dojo_Form_Element_TextBox('phone_number');
$phone_number->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$borrow_bath = new Zend_Dojo_Form_Element_TextBox('Start_day');
$borrow_bath->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$interest_bath = new Zend_Dojo_Form_Element_TextBox('interest_bath');
$interest_bath->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$loan_date = new Zend_Dojo_Form_Element_DateTextBox('loan_date');
$loan_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox'));
$borrow_rail = new Zend_Dojo_Form_Element_TextBox('borrow_rail');
$borrow_rail->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$interest_rail = new Zend_Dojo_Form_Element_TextBox('interest_rail');
$interest_rail->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$total_interest = new Zend_Dojo_Form_Element_CheckBox('total_interest');
$total_interest->setAttribs(array('dojoType' => 'dijit.form.CheckBox'));
$total_interested = new Zend_Dojo_Form_Element_TextBox('total_interested');
$total_interested->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
$this->addElements(array($borrower, $borrow_dollar, $interest_dollar, $phone_number, $borrow_bath, $interest_bath, $loan_date, $borrow_rail, $interest_rail, $total_interested));
return $this;
}
示例10: Frmcallecterall
public function Frmcallecterall($data = null)
{
$name_en = new Zend_Dojo_Form_Element_TextBox('title_en');
$name_en->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
$name_kh = new Zend_Dojo_Form_Element_TextBox('title_kh');
$name_kh->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'required' => true));
$key_code = new Zend_Dojo_Form_Element_NumberTextBox('key_code');
$key_code->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
$_display = new Zend_Dojo_Form_Element_FilteringSelect('display_by');
$_display->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$_display_opt = array(1 => $this->tr->translate("NAME_KHMER"), 2 => $this->tr->translate("NAME_ENGLISH"));
$_display->setMultiOptions($_display_opt);
$_arr = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
$_status->setMultiOptions($_arr);
$_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true', 'missingMessage' => 'Invalid Module!', 'class' => 'fullside'));
$date_call = new Zend_Dojo_Form_Element_DateTextBox('date');
$date_call->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
$date_call->setValue(date('Y-m-d'));
$_id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
$name_en->setValue($data['title_en']);
$name_kh->setValue($data['title_kh']);
$_display->setValue($data['displayby']);
$_status->setValue($data['status']);
$date_call->setValue($data['date']);
//$key_code->setValue($data['key_code']);
$_id->setValue($data['id']);
}
$this->addElements(array($name_en, $name_kh, $key_code, $_id, $_display, $_status, $date_call));
return $this;
}
示例11: addProServiceCategory
public function addProServiceCategory($data = null)
{
$_title = new Zend_Dojo_Form_Element_ValidationTextBox('servicetype_title');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'class' => 'fullside', 'required' => 'true'));
$_tem_desc = new Zend_Dojo_Form_Element_TextBox('item_desc');
$_tem_desc->setAttribs(array('dojoType' => $this->text, 'required' => 'true', 'class' => 'fullside'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('sertype_status');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_type = new Zend_Dojo_Form_Element_FilteringSelect('ser_type');
$_status_type = array(1 => $this->tr->translate("SERVICE"), 2 => $this->tr->translate("PROGRAM"));
$_type->setMultiOptions($_status_type);
$_type->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_id = new Zend_Form_Element_Hidden('id');
$_id->setAttribs(array('dojoType' => $this->text));
if ($data != null) {
$_id->setValue($data['id']);
$_title->setValue($data['title']);
$_tem_desc->setValue($data['item_desc']);
$_status->setValue($data['status']);
$_type->setValue($data['type']);
}
$this->addElements(array($_title, $_tem_desc, $_status, $_type, $_id));
return $this;
}
示例12: AdvanceSearch
public function AdvanceSearch($data = null, $type = null)
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("ADVANCE_SEARCH")));
$_title->setValue($request->getParam("adv_search"));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => $this->filter));
$_status_opt = array(-1 => $this->tr->translate("ALL"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_status->setValue($request->getParam("status"));
$db = new Application_Model_DbTable_DbGlobal();
$_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
$_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch', 'label' => 'Search'));
$from_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
$from_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
$_date = $request->getParam("start_date");
if (empty($_date)) {
$_date = date('Y-m-d');
}
$from_date->setValue($_date);
$to_date = new Zend_Dojo_Form_Element_DateTextBox('end_date');
$to_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside'));
$_date = $request->getParam("end_date");
if (empty($_date)) {
$_date = date("Y-m-d");
}
$to_date->setValue($_date);
$this->addElements(array($from_date, $to_date, $type, $_title, $_title, $_status, $_btn_search));
return $this;
}
示例13: FrmGeneraljurnal
public function FrmGeneraljurnal($data = null)
{
$Brance = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$Brance->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getJurnalcode();'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options = '';
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['branch_namekh'];
}
}
$rows = $db->getAllBranchName();
$options = array('' => '---Select Branch---');
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['branch_namekh'];
}
}
$Brance->setMultiOptions($options);
$_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
$_currency_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = $db->getVewOptoinTypeByType(15, 1, 3, 1);
$_currency_type->setMultiOptions($opt);
$_currency_type->setValue(2);
$parent = new Zend_Dojo_Form_Element_FilteringSelect('parent');
$parent->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getAllAccountNameByParents();'));
$db = new Accounting_Model_DbTable_DbChartaccount();
$option = $db->getAllchartaccount(3, 1);
$parent->setMultiOptions($option);
$Add_Date = new Zend_Dojo_Form_Element_DateTextBox('add_date');
$Add_Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
$Add_Date->setValue(date('Y-m-d'));
$Account_Number = new Zend_Dojo_Form_Element_TextBox('journal_code');
$Account_Number->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readOnly' => 'readOnly', 'required' => 'true'));
$invoice = new Zend_Dojo_Form_Element_TextBox('invoice');
$invoice->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Note = new Zend_Dojo_Form_Element_TextBox('note');
$Note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Debit = new Zend_Dojo_Form_Element_NumberTextBox('debit');
$Debit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
// $Debit->setValue(0);
$Credit = new Zend_Dojo_Form_Element_NumberTextBox('credit');
$Credit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
$id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
$id->setValue($data['id']);
$Brance->setValue($data['branch_id']);
$Account_Number->setValue($data['journal_code']);
$invoice->setValue($data['receipt_number']);
$_currency_type->setValue($data['currency_id']);
$Note->setValue($data['note']);
$Add_Date->setValue($data['date']);
$Debit->setValue($data['debit']);
$Credit->setValue($data['credit']);
}
// $Credit->setValue(0);
$this->addElements(array($id, $invoice, $_currency_type, $parent, $Add_Date, $Account_Number, $Note, $Debit, $Credit, $Brance));
return $this;
}
示例14: FrmAddHoliday
public function FrmAddHoliday($_data = null)
{
$_holiday_name = new Zend_Dojo_Form_Element_TextBox('holiday_name');
$_holiday_name->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_startdate = new Zend_Dojo_Form_Element_DateTextBox('start_date');
$_startdate->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
$date = date("Y-m-d");
$_startdate->setValue($date);
$_enddate = new Zend_Dojo_Form_Element_DateTextBox('end_date');
$_enddate->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside'));
$_date = date("Y-m-d");
$_enddate->setValue($_date);
$_amount_day = new Zend_Dojo_Form_Element_NumberTextBox('amount_day');
$_amount_day->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'required' => 'true', 'class' => 'fullside', 'onkeyup' => 'CalculateDate();'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_id = new Zend_Form_Element_Hidden('id');
if (!empty($_data)) {
$_holiday_name->setValue($_data['holiday_name']);
$_startdate->setValue($_data['start_date']);
$_amount_day->setValue($_data['amount_day']);
$_enddate->setValue($_data['end_date']);
$_status->setValue($_data['status']);
$_id->setValue($_data['id']);
}
$this->addElements(array($_id, $_holiday_name, $_startdate, $_enddate, $_amount_day, $_status));
return $this;
}
示例15: addSendMoney
public function addSendMoney($data = null)
{
/* Form Elements & Other Definitions Here ... */
$request = Zend_Controller_Front::getInstance()->getRequest();
$_title = new Zend_Dojo_Form_Element_TextBox('adv_search');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'onkeyup' => 'this.submit()', 'placeholder' => $this->tr->translate("Keepping INFO")));
$_title->setValue($request->getParam("adv_search"));
$sendname = new Zend_Dojo_Form_Element_FilteringSelect('send_name');
$sendname->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
$db = new Keeping_Model_DbTable_DbKeeping();
$opt = $db->getNameKeeping(null, 1);
$sendname->setMultiOptions($opt);
// $opt=array(1=>"បន្ថែមឈ្មោះអ្នកផ្ញើរ",2=>"B",3=>"C",);
// $sendname->setMultiOptions($opt);
$typemoney = new Zend_Dojo_Form_Element_FilteringSelect('type_money');
$typemoney->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
$opt = array(1 => "dollar", 2 => "riel", 3 => "bart");
$typemoney->setMultiOptions($opt);
$pay_term = new Zend_Dojo_Form_Element_FilteringSelect('pay_term');
$pay_term->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'onchange' => "calExpiredDate();"));
$db = new Keeping_Model_DbTable_DbKeeping();
$opt = $db->getNameView(null, 1);
$pay_term->setMultiOptions($opt);
// $opt=array(1=>"ថ្ងៃ",2=>"សប្ថាហ៍",3=>"ខែ",);
// $pay_term->setMultiOptions($opt);
$money_inacc = new Zend_Dojo_Form_Element_ValidationTextBox('money_inacc');
$money_inacc->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
$date = new Zend_Dojo_Form_Element_DateTextBox('date');
$date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'onchange' => 'calExpiredDate();'));
$date->setValue(date('Y-m-d'));
$commission = new Zend_Dojo_Form_Element_ValidationTextBox('commission');
$commission->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
$amount_month = new Zend_Dojo_Form_Element_ValidationTextBox('amount_month');
$amount_month->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true, 'onkeyup' => "calExpiredDate();"));
$total_amount = new Zend_Dojo_Form_Element_ValidationTextBox('total_amount');
$total_amount->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
$epx_date = new Zend_Dojo_Form_Element_DateTextBox('epx_date');
$epx_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox'));
$epx_date->setValue(date('Y-m-d'));
$recieve_amount = new Zend_Dojo_Form_Element_ValidationTextBox('recieve_amount');
$recieve_amount->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
$report = new Zend_Dojo_Form_Element_NumberTextBox('report');
$report->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'required' => true));
$report->setValue(0);
$lbltotal_return = new Zend_Dojo_Form_Element_ValidationTextBox('lbltotal_return');
$lbltotal_return->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
$id = new Zend_Form_Element_Hidden("id");
if ($data != null) {
$sendname->setValue($data['client_id']);
$pay_term->setValue($data['payment_term']);
$date->setValue($data['date_keeping']);
$amount_month->setValue($data['amount_keeping']);
$epx_date->setValue($data['exp_date']);
$report->setValue($data['invoice_number']);
$id->setValue($data['id']);
}
$this->addElements(array($sendname, $typemoney, $pay_term, $money_inacc, $date, $commission, $amount_month, $total_amount, $epx_date, $recieve_amount, $report, $lbltotal_return, $id));
return $this;
}