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


PHP Zend_Form_Element_Radio::setAttribs方法代码示例

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


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

示例1: FrmReceive

 public function FrmReceive($data = null)
 {
     $wherehouse_id = new Zend_Form_Element_Select('wherehouse_id');
     $wherehouse_id->setAttribs(array('class' => 'form-control'));
     $wherehouse_id_opt = array("1" => $this->tr->translate("..."), "2" => $this->tr->translate("..."));
     $wherehouse_id->setMultiOptions($wherehouse_id_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $handow = new Zend_Form_Element_Text('handow');
     $handow->setAttribs(array('class' => 'form-control'));
     $document = new Zend_Form_Element_Button('3');
     $document->setAttribs(array('class' => 'form-control'));
     $session = new Zend_Form_Element_Button('7');
     $session->setAttribs(array('class' => 'form-control'));
     $item_code = new Zend_Form_Element_Select('item_code');
     $item_code->setAttribs(array('class' => 'form-control'));
     $company_opt = array("1" => $this->tr->translate("SELECT_COMPANY"), "2" => $this->tr->translate("SELECT_COMPANY_NAME"));
     $item_code->setMultiOptions($company_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $ptd_usage_value = new Zend_Form_Element_Text('ptd_usage_value');
     $ptd_usage_value->setAttribs(array('class' => 'form-control'));
     $qty_onhand = new Zend_Form_Element_Text('demo3');
     $qty_onhand->setAttribs(array('class' => 'form-control', 'id' => 'demo3'));
     $branch = new Zend_Form_Element_Select('branch');
     $branch->setAttribs(array('class' => 'form-control'));
     $wherehouse_id_opt = array("1" => $this->tr->translate("..."), "2" => $this->tr->translate("..."));
     $branch->setMultiOptions($wherehouse_id_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $blank_smaler = new Zend_Form_Element_Select('blank_smaler');
     $blank_smaler->setAttribs(array('class' => 'form-control'));
     $company_opt = array("1" => $this->tr->translate("SELECT_COMPANY"), "2" => $this->tr->translate("SELECT_COMPANY_NAME"));
     $blank_smaler->setMultiOptions($company_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $average_cost = new Zend_Form_Element_Text('average_cost');
     $average_cost->setAttribs(array('class' => 'form-control'));
     $ptd_sale_value = new Zend_Form_Element_Text('ptd_sale_value');
     $ptd_sale_value->setAttribs(array('class' => 'form-control'));
     $unit_cost = new Zend_Form_Element_Radio('unit_cost');
     $unit_cost->setAttribs(array('class' => 'red'));
     $total_cost = new Zend_Form_Element_Radio('total_cost');
     $total_cost->setAttribs(array('class' => 'red'));
     $serial = new Zend_Form_Element_Text('serial');
     $serial->setAttribs(array('class' => 'form-control'));
     $lot = new Zend_Form_Element_Text('lot');
     $lot->setAttribs(array('class' => 'form-control'));
     $add_lind = new Zend_Form_Element_Button('add_lind');
     $add_lind->setAttribs(array('class' => 'form-control'));
     $edit_lind = new Zend_Form_Element_Button('edit_lind');
     $edit_lind->setAttribs(array('class' => 'form-control'));
     $delete_lind = new Zend_Form_Element_Button('delete_lind');
     $delete_lind->setAttribs(array('class' => 'form-control'));
     $concel_lind = new Zend_Form_Element_Button('concel_lind');
     $concel_lind->setAttribs(array('class' => 'form-control'));
     $this->addElements(array($combo, $wherehouse_id, $handow, $item_code, $branch, $document, $session, $blank_smaler, $ptd_usage_value, $qty_onhand, $unit_cost, $total_cost, $serial, $lot, $add_lind, $edit_lind, $delete_lind, $concel_lind));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:59,代码来源:FrmReceive.php

示例2: init

 public function init()
 {
     $this->setMethod("post");
     // produto_nome
     $produto_nome = new Zend_Form_Element_Text("produto_nome");
     $produto_nome->setLabel("Nome");
     $produto_nome->setRequired();
     $produto_nome->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o nome do produto'));
     $produto_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // produto_id
     $produto_id = new Zend_Form_Element_Hidden("produto_id");
     // fabricante_nome
     $fabricante_nome = new Zend_Form_Element_Text("fabricante_nome");
     $fabricante_nome->setLabel("Fabricante");
     //$fabricante_nome->setRequired();
     $fabricante_nome->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o nome do fabricante'));
     $fabricante_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // fabricante_id
     $fabricante_id = new Zend_Form_Element_Hidden("fabricante_id");
     // marca_nome
     $marca_nome = new Zend_Form_Element_Text("marca_nome");
     $marca_nome->setLabel("Marca");
     $marca_nome->setRequired();
     $marca_nome->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o nome da marca'));
     $marca_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // marca_id
     $marca_id = new Zend_Form_Element_Hidden("marca_id");
     // reclamacao_nome
     $reclamacao_nome = new Zend_Form_Element_Text("reclamacao_nome");
     $reclamacao_nome->setLabel("Nome");
     $reclamacao_nome->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe seu nome'));
     // reclamacap_email
     $reclamacao_email = new Zend_Form_Element_Text("reclamacao_email");
     $reclamacao_email->setLabel("E-mail");
     $reclamacao_email->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe seu e-mail'));
     // reclamacao_empresa
     $reclamacao_empresa = new Zend_Form_Element_Text("reclamacao_empresa");
     $reclamacao_empresa->setLabel("Empresa onde comprou o produto");
     $reclamacao_empresa->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe seu e-mail'));
     // reclamacao_cidade
     $reclamacao_cidade = new Zend_Form_Element_Text("reclamacao_cidade");
     $reclamacao_cidade->setLabel("Cidade");
     $reclamacao_cidade->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe sua cidade'));
     // reclamacao_estado
     $reclamacao_estado = new Zend_Form_Element_Select("reclamacao_estado");
     $reclamacao_estado->setLabel("Estado");
     $reclamacao_estado->setAttribs(array('class' => 'form-control'));
     $reclamacao_estado->setMultiOptions($this->getEstados());
     // reclamacao_descricao
     $reclamacao_descricao = new Zend_Form_Element_Textarea("reclamacao_descricao");
     $reclamacao_descricao->setLabel("Descreva sua reclamação");
     $reclamacao_descricao->setRequired();
     $reclamacao_descricao->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $reclamacao_descricao->setAttribs(array('class' => 'form-control', 'rows' => 5, 'placeholder' => 'Informe porque você está insatisfeito com o produto', 'maxlenght' => 500));
     $reclamacao_descricao->addValidator(new App_Validate_Reclamacao());
     // reclamacao_nota
     $reclamacao_nota = new Zend_Form_Element_Radio("reclamacao_nota");
     $reclamacao_nota->setLabel("Dê sua nota para o produto");
     $reclamacao_nota->setRequired();
     $reclamacao_nota->setAttribs(array('class' => ''));
     $reclamacao_nota->setMultiOptions($this->getNotasHtml());
     $reclamacao_nota->setOptions(array('escape' => false));
     $reclamacao_nota->setSeparator(" ");
     $reclamacao_nota->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // submit
     $submit = new Zend_Form_Element_Submit("submit");
     $submit->setLabel("Registrar Reclamação");
     $submit->setAttrib("class", 'form-control btn btn-success');
     $this->addElements(array($produto_nome, $fabricante_nome, $marca_nome, $reclamacao_descricao, $reclamacao_nome, $reclamacao_email, $reclamacao_cidade, $reclamacao_estado, $reclamacao_nota, $submit, $produto_id, $marca_id, $fabricante_id));
 }
开发者ID:nandorodpires2,项目名称:naopresta,代码行数:70,代码来源:Reclamacao.php

示例3: PurchaseOrder

 public function PurchaseOrder($data = null)
 {
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $paymentElement = new Zend_Form_Element_Submit('payment');
     $paymentElement->setAttribs(array('Phone' => 'Phone'));
     $this->addElement($paymentElement);
     $rs = $db->getGlobalDb('SELECT customer_id, cust_name FROM tb_customer WHERE cust_name!="" AND is_active=1 ');
     $customerValue = $request->getParam('users');
     $options = "";
     $options = array('' => $tr->translate('Please_Select'), '-1' => $tr->translate('ADD_CUSTOMER_ORDER'));
     if (!empty($rs)) {
         foreach ($rs as $read) {
             $options[$read['customer_id']] = $read['cust_name'];
         }
     }
     $customerID = new Zend_Form_Element_Select('customer_id');
     $customerID->setAttribs(array('id' => 'customer_id', 'Onchange' => 'getCustomerInfo()', 'class' => 'validate[required]'));
     $customerID->setMultiOptions($options);
     //$customerID->setattribs(array(id'=>'customer_id','onchange'=>'this.form.submit()',));
     $customerID->setValue($customerValue);
     $this->addElement($customerID);
     $orderElement = new Zend_Form_Element_Text('order');
     $orderElement->setAttribs(array('placeholder' => 'Optional'));
     $this->addElement($orderElement);
     $phoneElement = new Zend_Form_Element_Text('txt_phone');
     $phoneElement->setAttribs(array('placeholder' => 'Enter Contact Number'));
     $this->addElement($phoneElement);
     $user = $this->GetuserInfo();
     $options = "";
     $sql = "SELECT LocationId, Name FROM tb_sublocation WHERE Name!='' AND status = 1 ";
     if ($user["level"] == 1 or $user["level"] == 2) {
         $options = array("1" => $tr->translate("Please_Select"), "-1" => $tr->translate("ADD_NEW_LOCATION"));
     } else {
         $sql .= " ANd LocationId = " . $user["location_id"];
     }
     $sql .= " ORDER BY LocationId DESC";
     $rs = $db->getGlobalDb($sql);
     $productValue = $request->getParam('LocationId');
     if (!empty($rs)) {
         foreach ($rs as $read) {
             $options[$read['LocationId']] = $read['Name'];
         }
     }
     $locationID = new Zend_Form_Element_Select('LocationId');
     $locationID->setAttribs(array('id' => 'LocationId', 'Onchange' => 'AddLocation()', 'class' => 'validate[required]'));
     $locationID->setMultiOptions($options);
     $locationID->setValue($productValue);
     $this->addElement($locationID);
     $rowsmethodpay = $db->getGlobalDb('SELECT * FROM tb_paymentmethod');
     if ($rowsmethodpay) {
         foreach ($rowsmethodpay as $readCategory) {
             $option_method[$readCategory['payment_typeId']] = $readCategory['payment_name'];
         }
     }
     $paymentmethodElement = new Zend_Form_Element_Select('payment_name');
     $paymentmethodElement->setMultiOptions($option_method);
     $this->addElement($paymentmethodElement);
     $rowsPayment = $db->getGlobalDb('SELECT CurrencyId, Description,Symbol FROM tb_currency');
     if ($rowsPayment) {
         foreach ($rowsPayment as $readPayment) {
             $options_curr[$readPayment['CurrencyId']] = $readPayment['Description'] . $readPayment['Symbol'];
         }
     }
     $currencyElement = new Zend_Form_Element_Select('currency');
     $currencyElement->setMultiOptions($options_curr);
     $this->addElement($currencyElement);
     $descriptionElement = new Zend_Form_Element_Textarea('remark');
     $this->addElement($descriptionElement);
     $remarkaddElement = new Zend_Form_Element_Textarea('remark_add');
     $this->addElement($remarkaddElement);
     $allTotalElement = new Zend_Form_Element_Text('all_total');
     $allTotalElement->setAttribs(array('readonly' => 'readonly'));
     $this->addElement($allTotalElement);
     $discountTypeElement = new Zend_Form_Element_Radio('discount_type');
     $discountTypeElement->setMultiOptions(array(1 => '%', 2 => 'Fix Value'));
     $discountTypeElement->setAttribs(array('checked' => 'checked'));
     $discountTypeElement->setAttribs(array('onChange' => 'doTotal()'));
     $this->addElement($discountTypeElement);
     $netTotalElement = new Zend_Form_Element_Text('net_total');
     $netTotalElement->setAttribs(array('readonly' => 'readonly'));
     $this->addElement($netTotalElement);
     $discountValueElement = new Zend_Form_Element_Text('discount_value');
     $discountValueElement->setAttribs(array('class' => 'input100px', 'onChange' => 'doTotal()'));
     $this->addElement($discountValueElement);
     $discountRealElement = new Zend_Form_Element_Text('discount_real');
     $discountRealElement->setAttribs(array('readonly' => 'readonly', 'class' => 'input100px'));
     $this->addElement($discountRealElement);
     $discountValueElement = new Zend_Form_Element_Text('discount_value');
     $discountValueElement->setAttribs(array('class' => 'input100px', 'onChange' => 'doTotal()'));
     $this->addElement($discountValueElement);
     $paidRealElement = new Zend_Form_Element_Text('paid');
     $paidRealElement->setAttribs(array('class' => 'input100px', 'onChange' => 'Total1()'));
     $this->addElement($paidRealElement);
     $remainlElement = new Zend_Form_Element_Text('remain');
     $remainlElement->setAttribs(array('readonly' => 'readonly'));
     $this->addElement($remainlElement);
     $statusElement = new Zend_Form_Element_Select('status');
     //$statusElement->setAttribs(array('readonly'=>'readonly',));
//.........这里部分代码省略.........
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:101,代码来源:purchase.php

示例4: frm_transfer_items

 public function frm_transfer_items($data = null)
 {
     $item_code = new Zend_Form_Element_Text('item_code');
     $item_code->setAttribs(array('class' => 'form-control'));
     $unit_cost = new Zend_Form_Element_Text('unit_cost');
     $unit_cost->setAttribs(array('class' => 'form-control'));
     $qty = new Zend_Form_Element_Text('demo3');
     $qty->setAttribs(array('class' => 'form-control'));
     $unit_id = new Zend_Form_Element_Text('unit_id');
     $unit_id->setAttribs(array('class' => 'form-control'));
     $serial = new Zend_Form_Element_Text('serial');
     $serial->setAttribs(array('class' => 'form-control'));
     $percending = new Zend_Form_Element_Text('percending');
     $percending->setAttribs(array('class' => 'form-control'));
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setAttribs(array('class' => 'form-control'));
     $supplier_id = new Zend_Form_Element_Text('supplier_id ');
     $supplier_id->setAttribs(array('class' => 'form-control'));
     $part_number = new Zend_Form_Element_Text('part_number ');
     $part_number->setAttribs(array('class' => 'form-control'));
     $radio = new Zend_Form_Element_Radio('radio');
     $radio->setAttribs(array('class' => 'form-control', 'style' => "position: absolute; top: -10%; left: -10%; display: block; width: 120%; \r\n\t\t\t\theight: 120%; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% rgb(255, 255, 255); border: 0px none; opacity: 0;"));
     $from_location = new Zend_Form_Element_Text('from_location');
     $from_location->setAttribs(array('class' => 'form-control', 'readOnly' => true));
     $from_locationl = new Zend_Form_Element_Text('from_locationl');
     $from_locationl->setAttribs(array('class' => 'form-control'));
     $lbl_project = new Zend_Form_Element_Text('lbl_project');
     $lbl_project->setAttribs(array('class' => 'form-control'));
     $to_location = new Zend_Form_Element_Text('to_location');
     $to_location->setAttribs(array('class' => 'form-control'));
     $to_locations = new Zend_Form_Element_Text('to_locations');
     $to_locations->setAttribs(array('class' => 'form-control'));
     $lbl_sessiont = new Zend_Form_Element_Text('lbl_sessiont');
     $lbl_sessiont->setAttribs(array('class' => 'form-control'));
     $lang_1 = new Zend_Form_Element_Text('lang_1');
     $lang_1->setAttribs(array('class' => 'form-control'));
     $avaiable = new Zend_Form_Element_Text('avaiable');
     $avaiable->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     $avaiables = new Zend_Form_Element_Text('avaiables');
     $avaiables->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     $lang_3 = new Zend_Form_Element_Text('lang_3');
     $lang_3->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     if ($data != null) {
         // 			print_r($data);
     }
     $show_description = new Zend_Form_Element_Select('show_description');
     $show_description->setAttribs(array('class' => 'form-control'));
     $description_opt = array("" => $this->tr->translate("SELECT_DESCRIPTION"));
     $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'));
     $font_color = new Zend_Form_Element_Text('font_color');
     $font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
     $item_code = new Zend_Form_Element_Text('item_code');
     $item_code->setAttribs(array('class' => 'form-control', 'value' => 12, 'placeholder' => '0'));
     $teme_codes = new Zend_Form_Element_Text('teme_codes');
     $teme_codes->setAttribs(array('class' => 'form-control', 'value' => 12, 'placeholder' => '12'));
     $apply = new Zend_Form_Element_Select('apply');
     $apply->setAttribs(array('class' => 'form-control'));
     $apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
     $apply->setMultiOptions($apply_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $allocation = new Zend_Form_Element_Text('allocation');
     $allocation->setAttribs(array('class' => 'form-control'));
     $bar_code = new Zend_Form_Element_Text('bar_code');
     $bar_code->setAttribs(array('class' => 'form-control'));
     $on_han = new Zend_Form_Element_Text('on_hand');
     $on_han->setAttribs(array('class' => 'form-control'));
     $tot_not = new Zend_Form_Element_Text('lot_no');
     $tot_not->setAttribs(array('class' => 'form-control'));
     $wo = new Zend_Form_Element_Text('wo');
     $wo->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
     $note = new Zend_Form_Element_Textarea('note');
     $note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
     $this->addElements(array($avaiables, $from_location, $unit_cost, $serial, $unit_id, $tot_not, $percending, $amount, $item_code, $radio, $part_number, $supplier_id, $apply, $allocation, $combo, $item_code, $lang_1, $avaiable, $lang_3, $teme_codes, $lbl_sessiont, $to_locations, $to_location, $lbl_project, $from_locationl, $show_description, $background, $font_color, $bar_code, $qty, $on_han, $wo, $note));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:79,代码来源:FrmTransferItems.php

示例5: frm_stock_adjustment

 public function frm_stock_adjustment($data = null)
 {
     $harehoust_id = new Zend_Form_Element_Text('harehoust_id');
     $harehoust_id->setAttribs(array('class' => 'form-control'));
     $har_id = new Zend_Form_Element_Text('har_id');
     $har_id->setAttribs(array('class' => 'form-control', 'readonly' => 'true'));
     $date = new Zend_Form_Element_Text('date');
     $date->setAttribs(array('class' => 'form-control date-picker'));
     $date->setValue(date('Y-m-d'));
     $totale_re = new Zend_Form_Element_Text('totale_re');
     $totale_re->setAttribs(array('class' => 'form-control'));
     $last_re = new Zend_Form_Element_Text('last_re');
     $last_re->setAttribs(array('class' => 'form-control'));
     $percending = new Zend_Form_Element_Text('percending');
     $percending->setAttribs(array('class' => 'form-control'));
     $amount = new Zend_Form_Element_Text('amount');
     $amount->setAttribs(array('class' => 'form-control'));
     $supplier_id = new Zend_Form_Element_Text('supplier_id ');
     $supplier_id->setAttribs(array('class' => 'form-control'));
     $session = new Zend_Form_Element_Text('session');
     $session->setAttribs(array('class' => 'form-control', 'readonly' => true));
     $item_code = new Zend_Form_Element_Text('item_code');
     $item_code->setAttribs(array('class' => 'form-control'));
     $barcode = new Zend_Form_Element_Text('barcode');
     $barcode->setAttribs(array('class' => 'form-control'));
     $adjus_factor = new Zend_Form_Element_Text('adjus_factor');
     $adjus_factor->setAttribs(array('class' => 'form-control'));
     $adjus_factor = new Zend_Form_Element_Text('adjus_factor');
     $adjus_factor->setAttribs(array('class' => 'form-control'));
     $on_hand = new Zend_Form_Element_Text('on_hand');
     $on_hand->setAttribs(array('class' => 'form-control'));
     $on_hands = new Zend_Form_Element_Text('on_hands');
     $on_hands->setAttribs(array('class' => 'form-control'));
     $adjus_factors = new Zend_Form_Element_Text('adjus_factors');
     $adjus_factors->setAttribs(array('class' => 'form-control'));
     $item_codes = new Zend_Form_Element_Text('item_codes');
     $item_codes->setAttribs(array('class' => 'form-control', 'readonly' => true));
     $radio = new Zend_Form_Element_Radio('radio');
     $radio->setAttribs(array('class' => 'form-control', 'style' => "position: absolute; top: -10%; left: -10%; display: block; width: 120%; \r\n\t\t\t\theight: 120%; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% rgb(255, 255, 255); border: 0px none; opacity: 0;"));
     $referent = new Zend_Form_Element_Text('referent');
     $referent->setAttribs(array('class' => 'form-control'));
     $lang_1 = new Zend_Form_Element_Text('lang_1');
     $lang_1->setAttribs(array('class' => 'form-control'));
     $lang_2 = new Zend_Form_Element_Text('lang_2');
     $lang_2->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     $lang_3 = new Zend_Form_Element_Text('lang_3');
     $lang_3->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     if ($data != null) {
         // 			print_r($data);
     }
     $show_description = new Zend_Form_Element_Select('show_description');
     $show_description->setAttribs(array('class' => 'form-control'));
     $description_opt = array("" => $this->tr->translate("SELECT_DESCRIPTION"));
     $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'));
     $font_color = new Zend_Form_Element_Text('font_color');
     $font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
     $demo_time = new Zend_Form_Element_Text('demo_time');
     $demo_time->setAttribs(array('class' => 'form-control', 'id' => "demo3", 'value' => 12, 'placeholder' => '0'));
     $font_size = new Zend_Form_Element_Text('demo3');
     $font_size->setAttribs(array('class' => 'form-control', 'id' => "demo3", 'value' => 12, 'placeholder' => '12'));
     $apply = new Zend_Form_Element_Select('apply');
     $apply->setAttribs(array('class' => 'form-control'));
     $apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
     $apply->setMultiOptions($apply_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $active = new Zend_Form_Element_Checkbox('active');
     $active->setAttribs(array('class' => 'red'));
     $format = new Zend_Form_Element_Text('demo4');
     $format->setAttribs(array('class' => 'form-control', 'id' => "demo4", 'value' => 12, 'placeholder' => '12'));
     $setting = new Zend_Form_Element_Select('setting');
     $setting->setAttribs(array('class' => 'form-control'));
     $arrange = new Zend_Form_Element_Text('arrange');
     $arrange->setAttribs(array('class' => 'form-control'));
     $resize = new Zend_Form_Element_Text('resize');
     $resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
     $note = new Zend_Form_Element_Textarea('note');
     $note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
     $this->addElements(array($on_hands, $on_hand, $adjus_factor, $adjus_factors, $barcode, $harehoust_id, $har_id, $date, $totale_re, $last_re, $percending, $amount, $demo_time, $item_codes, $radio, $session, $supplier_id, $apply, $active, $combo, $item_code, $referent, $lang_1, $lang_2, $lang_3, $show_description, $background, $font_color, $font_size, $format, $setting, $arrange, $resize, $note));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:84,代码来源:FrmStockAdjustment.php

示例6: getRadios

 /**
  * Get Radio Option
  * @param string $id
  * @param array $option
  * @param string $value
  * @return Zend_Form_Element_Radio
  */
 public function getRadios($id, $option, $value = '', $elementequired = false)
 {
     $element = new Zend_Form_Element_Radio($id);
     $element->addMultiOptions($option);
     $element->removeDecorator('HtmlTag');
     $element->removeDecorator('DtDdWrapper');
     $element->removeDecorator('Label');
     $element->setSeparator('<br/>');
     if ($value !== '') {
         $element->setValue($value);
     }
     if ($elementequired) {
         $element->setAttribs(array('class' => 'validate[required] radio'));
     }
     return $element;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:23,代码来源:FrmElementGlobal.php


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