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


PHP Zend_Form_Element_File::setAttribs方法代码示例

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


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

示例1: init

 public function init()
 {
     // projeto_id
     $projeto_id = new Zend_Form_Element_Select("projeto_id");
     $projeto_id->setLabel("Projeto: ");
     $projeto_id->setAttribs(array('class' => 'form-control'));
     $projeto_id->setMultiOptions($this->getProjetos());
     // cliente_id
     $cliente_id = new Zend_Form_Element_Select("cliente_id");
     $cliente_id->setLabel("Cliente: ");
     $cliente_id->setAttribs(array('class' => 'form-control'));
     $cliente_id->setRequired(false);
     $cliente_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente_id->setMultiOptions($this->getClientes());
     // faturamento_tipo
     $faturamento_tipo = new Zend_Form_Element_Select("faturamento_tipo");
     $faturamento_tipo->setLabel("Tipo: ");
     $faturamento_tipo->setAttribs(array('class' => 'form-control'));
     $faturamento_tipo->setRequired(false);
     $faturamento_tipo->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $faturamento_tipo->setMultiOptions(array(1 => 'Boleto', 2 => 'Transferência'));
     // faturamento_valor
     $faturamento_valor = new Zend_Form_Element_Text("faturamento_valor");
     $faturamento_valor->setLabel("Valor: ");
     $faturamento_valor->setAttribs(array('class' => 'form-control'));
     //$faturamento_valor->setRequired();
     $faturamento_valor->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_descricao
     $faturamento_descricao = new Zend_Form_Element_Text("faturamento_descricao");
     $faturamento_descricao->setLabel("Descrição: ");
     $faturamento_descricao->setAttribs(array('class' => 'form-control'));
     $faturamento_descricao->setRequired();
     $faturamento_descricao->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_nosso_numero
     $faturamento_nosso_numero = new Zend_Form_Element_Text("faturamento_nosso_numero");
     $faturamento_nosso_numero->setLabel("Nosso Nº: ");
     $faturamento_nosso_numero->setAttribs(array('class' => 'form-control'));
     //$faturamento_nosso_numero->setRequired();
     $faturamento_nosso_numero->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_vencimento
     $faturamento_vencimento = new Zend_Form_Element_Text("faturamento_vencimento");
     $faturamento_vencimento->setLabel("Vencimento: ");
     $faturamento_vencimento->setAttribs(array('class' => 'form-control'));
     $faturamento_vencimento->setRequired();
     $faturamento_vencimento->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // faturamento_nota_fiscal
     $faturamento_nota_fiscal = new Zend_Form_Element_File("faturamento_nota_fiscal");
     $faturamento_nota_fiscal->setLabel("Nota Fiscal:");
     $faturamento_nota_fiscal->addDecorators(App_Forms_Decorators::$ElementDecoratorFile);
     $faturamento_nota_fiscal->setAttribs(array('class' => 'filestyle', 'data-buttonText' => 'Selecione a Nota Fiscal', 'data-iconName' => 'fa fa-file'));
     //$faturamento_nota_fiscal->setRequired();
     $faturamento_nota_fiscal->setDestination(Zend_Registry::get('config')->notafiscal->filepath);
     $faturamento_nota_fiscal->addValidators(array(array('Extension', false, 'pdf')));
     $this->addElements(array($projeto_id, $cliente_id, $faturamento_tipo, $faturamento_vencimento, $faturamento_valor, $faturamento_nosso_numero, $faturamento_descricao, $faturamento_nota_fiscal));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:56,代码来源:FaturamentoCadastro.php

示例2: init

 public function init()
 {
     // proposta_numero
     $proposta_numero = new Zend_Form_Element_Text("proposta_numero");
     $proposta_numero->setLabel("Número: ");
     $proposta_numero->setAttribs(array('class' => 'form-control'));
     // proposta_tipo_id
     $proposta_tipo_id = new Zend_Form_Element_Select("proposta_tipo_id");
     $proposta_tipo_id->setLabel("Tipo Proposta: ");
     $proposta_tipo_id->setAttribs(array('class' => 'form-control'));
     $proposta_tipo_id->setRequired();
     $proposta_tipo_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $proposta_tipo_id->setMultiOptions($this->getPropostaTipo());
     // cliente_id
     $cliente_id = new Zend_Form_Element_Select("cliente_id");
     $cliente_id->setLabel("Cliente: ");
     $cliente_id->setAttribs(array('class' => 'form-control'));
     $cliente_id->setRequired();
     $cliente_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $cliente_id->setMultiOptions($this->getClientes());
     // tipo_servico_id
     $tipo_servico_id = new Zend_Form_Element_Select("tipo_servico_id");
     $tipo_servico_id->setLabel("Tipo de Serviço: ");
     $tipo_servico_id->setAttribs(array('class' => 'form-control'));
     $tipo_servico_id->setRequired();
     $tipo_servico_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $tipo_servico_id->setMultiOptions($this->getTipoServicos());
     // proposta_horas
     $proposta_horas = new Zend_Form_Element_Text("proposta_horas");
     $proposta_horas->setLabel("Horas: ");
     $proposta_horas->setAttribs(array('class' => 'form-control'));
     // proposta_valor
     $proposta_valor = new Zend_Form_Element_Text("proposta_valor");
     $proposta_valor->setLabel("Valor: ");
     $proposta_valor->setAttribs(array('class' => 'form-control'));
     // proposta_data
     $proposta_data = new Zend_Form_Element_Text("proposta_data");
     $proposta_data->setLabel("Data: ");
     $proposta_data->setAttribs(array('class' => 'form-control'));
     // proposta_vencimento
     $proposta_vencimento = new Zend_Form_Element_Text("proposta_vencimento");
     $proposta_vencimento->setLabel("Vencimento: ");
     $proposta_vencimento->setAttribs(array('class' => 'form-control'));
     // proposta_documento
     $proposta_documento = new Zend_Form_Element_File("proposta_documento");
     $proposta_documento->setLabel("Proposta:");
     $proposta_documento->addDecorators(App_Forms_Decorators::$ElementDecoratorFile);
     $proposta_documento->setAttribs(array('class' => 'filestyle', 'data-buttonText' => 'Selecione o PDF', 'data-iconName' => 'fa fa-file'));
     //$proposta_documento->setRequired();
     $proposta_documento->setDestination(Zend_Registry::get('config')->proposta->filepath);
     $proposta_documento->addValidators(array(array('Extension', false, 'pdf')));
     $this->addElements(array($proposta_numero, $cliente_id, $proposta_tipo_id, $tipo_servico_id, $proposta_horas, $proposta_valor, $proposta_data, $proposta_vencimento, $proposta_documento));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:54,代码来源:PropostaCadastro.php

示例3: init

 public function init()
 {
     // profissional_beleza_nome
     $profissional_beleza_nome = new Zend_Form_Element_Text("profissional_beleza_nome");
     $profissional_beleza_nome->setLabel("Nome: ");
     $profissional_beleza_nome->setAttribs(array('class' => 'form-control'));
     $profissional_beleza_nome->setRequired();
     $profissional_beleza_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // profissional_beleza_email
     $profissional_beleza_email = new Zend_Form_Element_Text("profissional_beleza_email");
     $profissional_beleza_email->setLabel("E-mail: ");
     $profissional_beleza_email->setValidators(array('EmailAddress'));
     $profissional_beleza_email->addValidator(new App_Validate_ProfissionalBeleza());
     $profissional_beleza_email->setAttribs(array('class' => 'form-control'));
     $profissional_beleza_email->setRequired();
     $profissional_beleza_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     /**
      * profisional_beleza_sexo
      */
     $profissional_beleza_sexo = new Zend_Form_Element_Radio("profissional_beleza_sexo");
     $profissional_beleza_sexo->setLabel("Sexo:");
     $profissional_beleza_sexo->setRequired();
     $profissional_beleza_sexo->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $profissional_beleza_sexo->setMultiOptions(array('M' => ' Masculino', 'F' => ' Feminino'));
     // profissional_beleza_avatar
     $profissional_beleza_avatar = new Zend_Form_Element_File("profissional_beleza_avatar");
     $profissional_beleza_avatar->setLabel(" \n            Foto: \n        ");
     $profissional_beleza_avatar->addDecorators(App_Forms_Decorators::$ElementDecoratorFile);
     $profissional_beleza_avatar->setAttribs(array('class' => 'filestyle', 'data-buttonText' => 'Selecione a foto', 'data-iconName' => 'fa fa-user'));
     $profissional_beleza_avatar->setRequired();
     $profissional_beleza_avatar->setDestination(Zend_Registry::get('config')->profissional->avatar->path);
     $profissional_beleza_avatar->addValidators(array(array('Extension', false, 'jpg,jpeg,png')));
     $profissional_beleza_avatar->addFilter(new Skoch_Filter_File_Resize(array('width' => 160, 'keepRatio' => true)));
     // especialidade_id
     $especialidade_id = new Zend_Form_Element_MultiCheckbox("especialidade_id");
     $especialidade_id->setLabel("Selecione as especialidades: ");
     $especialidade_id->setAttribs(array('class' => ''));
     $especialidade_id->setRequired();
     $especialidade_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     $especialidade_id->setSeparator(' ');
     $especialidade_id->setMultiOptions($this->getEspecialidades());
     // addElements
     $this->addElements(array($profissional_beleza_nome, $profissional_beleza_email, $profissional_beleza_sexo, $profissional_beleza_avatar, $especialidade_id));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:45,代码来源:ProfissionalBelezaAdd.php

示例4: FrmaddGuide

 public function FrmaddGuide($data = null)
 {
     $pob = new Zend_Dojo_Form_Element_TextBox('pob');
     $pob->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $att_file = new Zend_Form_Element_File('att_file');
     $att_file->setAttribs(array('class' => 'fullside'));
     $_dob = new Zend_Dojo_Form_Element_DateTextBox('dob_client');
     $_dob->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $_dob->setValue(date("Y-m-d"));
     $nationality = new Zend_Dojo_Form_Element_TextBox('nationality');
     $nationality->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
     $_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $id_client = $db->getDriverCode();
     $_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
     $_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
     $_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
     $_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
     $_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_phone = new Zend_Dojo_Form_Element_TextBox('phone');
     $_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $normalprice = new Zend_Dojo_Form_Element_NumberTextBox('cnormalprice');
     $normalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $otprice = new Zend_Dojo_Form_Element_NumberTextBox('cotprice');
     $otprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $pnormalprice = new Zend_Dojo_Form_Element_NumberTextBox('pnormalprice');
     $pnormalprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $potprice = new Zend_Dojo_Form_Element_NumberTextBox('potprice');
     $potprice->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $national_id = new Zend_Dojo_Form_Element_TextBox('national_id');
     $national_id->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $experience = new Zend_Dojo_Form_Element_TextBox('experience');
     $experience->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $publicholiday = new Zend_Dojo_Form_Element_NumberTextBox('poblicholiday_price');
     $publicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $weekend_price = new Zend_Dojo_Form_Element_NumberTextBox('weekend_price');
     $weekend_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $experience_num = new Zend_Dojo_Form_Element_NumberTextBox('experience_number');
     $experience_num->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_popublicholiday = new Zend_Dojo_Form_Element_NumberTextBox('ppoblicholiday_price');
     $p_popublicholiday->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $p_weekend = new Zend_Dojo_Form_Element_NumberTextBox('pweekend_price');
     $p_weekend->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $monthly_price = new Zend_Dojo_Form_Element_NumberTextBox('monthly_price');
     $monthly_price->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => true));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Dojo_Form_Element_TextBox('desc');
     $_desc->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:30px;'));
     $lang = new Zend_Dojo_Form_Element_TextBox('lang');
     $lang->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:50px;'));
     $_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = array(1 => "Active", 0 => "Deactive");
     $_status->setMultiOptions($opt);
     $_type = new Zend_Dojo_Form_Element_FilteringSelect('type');
     $_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $_status_opt = array(1 => $this->tr->translate("Guide"), 2 => $this->tr->translate("Driver"), 3 => $this->tr->translate("Both"));
     $_status_opt = $db->getVewOptoinTypeByType(8, 1, null, 1);
     $_type->setMultiOptions($_status_opt);
     $address = new Zend_Dojo_Form_Element_TextBox('home');
     $address->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $groupnum = new Zend_Dojo_Form_Element_TextBox('group');
     $groupnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $streetnum = new Zend_Dojo_Form_Element_TextBox('street');
     $streetnum->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $commune = new Zend_Dojo_Form_Element_TextBox('commune');
     $commune->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $district = new Zend_Dojo_Form_Element_TextBox('district');
     $district->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $province = new Zend_Dojo_Form_Element_FilteringSelect('province');
     $province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $id_card = new Zend_Dojo_Form_Element_TextBox('id_card');
     $id_card->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
     $issued_date = new Zend_Dojo_Form_Element_DateTextBox('issued_date');
     $issued_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $issued_date->setValue(date("Y-m-d"));
     $registered_date = new Zend_Dojo_Form_Element_DateTextBox('registered_date');
     $registered_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $registered_date->setValue(date("Y-m-d"));
     $expired_date = new Zend_Dojo_Form_Element_DateTextBox('expired_date');
     $expired_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
     $expired_date->setValue(date("Y-m-d"));
     $_email = new Zend_Dojo_Form_Element_TextBox('email');
     $_email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'color:red;'));
     ///////////////////////
     $citynormalprice = new Zend_Dojo_Form_Element_NumberTextBox('citynormalprice');
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmClient.php

示例5: FrmAddClient

	public function FrmAddClient($data=null){
		$_spouse = new Zend_Dojo_Form_Element_TextBox('spouse');
		$_spouse->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$_releted = new Zend_Dojo_Form_Element_TextBox('relate_with');
		$_releted->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$clienttype_nameen= new Zend_Dojo_Form_Element_DateTextBox('clienttype_nameen');
		$clienttype_nameen->setAttribs(array('dojoType'=>'dijit.form.TextBox','class'=>'fullside'
		));
		$clienttype_namekh= new Zend_Dojo_Form_Element_DateTextBox('clienttype_namekh');
		$clienttype_namekh->setAttribs(array('dojoType'=>'dijit.form.TextBox','class'=>'fullside'
		));
		$dob_join_acc= new Zend_Dojo_Form_Element_DateTextBox('dob_join_acc');
		$dob_join_acc->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
		));
		$_dob_Guarantor= new Zend_Dojo_Form_Element_DateTextBox('dob_guarantor');
		$_dob_Guarantor->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
		));
		$_dob= new Zend_Dojo_Form_Element_DateTextBox('dob_client');
		$_dob->setAttribs(array('dojoType'=>'dijit.form.DateTextBox','class'=>'fullside',
		));
		
		
		$_relate_tel = new Zend_Dojo_Form_Element_TextBox('relate_tel');
		$_relate_tel->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$_guarantor_tel = new Zend_Dojo_Form_Element_TextBox('guarantor_tel');
		$_guarantor_tel->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		$_guarantor_with = new Zend_Dojo_Form_Element_TextBox('guarantor_with');
		$_guarantor_with->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
		));
		
		
		$request=Zend_Controller_Front::getInstance()->getRequest();
		
		$_group = new Zend_Dojo_Form_Element_CheckBox('is_group');
		$_group->setAttribs(array(
				'dojoType'=>'dijit.form.CheckBox',
				'onClick'=>'getGroupCode();',
				));
		
		$_group_code = new Zend_Dojo_Form_Element_TextBox('group_code');
		$_group_code->setAttribs(array(
				'dojoType'=>'dijit.form.TextBox',
				'class'=>'fullside',
				'readonly'=>'readonly',
				'style'=>'color:red;'
		));
		
// 		$db = new Application_Model_DbTable_DbGlobal();
// 		$id_client = $db->getNewClientId();
		
		$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
		$_branch_id->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'Onchange'=>'getFunction();'
		));
		$db = new Application_Model_DbTable_DbGlobal();
		$rows = $db->getAllBranchName();
		$options=array(''=>"---Select Branch Name---");
		if(!empty($rows))foreach($rows AS $row) $options[$row['br_id']]=$row['displayby']==1?$row['branch_namekh']:$row['branch_nameen'];
		$_branch_id->setMultiOptions($options);
	
		
		
		$_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
		$_member->setAttribs(array(
				'dojoType'=>'dijit.form.FilteringSelect',
				'class'=>'fullside',
				'onchange'=>'getGroupCode();'
		));
		$db = new Application_Model_DbTable_DbGlobal();
		$rows = $db->getClientByType(1);
		$options=array(''=>"---Select Group Name---");
		if(!empty($rows))foreach($rows AS $row) $options[$row['client_id']]=$row['name_en'];
		$_member->setMultiOptions($options);
		
		$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
		$_namekh->setAttribs(array(
						'dojoType'=>'dijit.form.ValidationTextBox',
						'class'=>'fullside',
						'required' =>'true'
		));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lnms,代码行数:101,代码来源:FrmClient.php

示例6: FrmCustomer

 public function FrmCustomer($data = null)
 {
     $_dob = new Zend_Form_Element_Text('dob_client');
     $_dob->setValue(date("d-m-Y"));
     $_dob->setAttribs(array('class' => 'fullside', "style" => "width:100%"));
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $_namekh = new Zend_Form_Element_Text('name_kh');
     $_namekh->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_clientno = new Zend_Form_Element_Text('client_no');
     $_clientno->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $id_client = $db->getNewClientId();
     $_clientno->setValue($id_client);
     $_nameen = new Zend_Form_Element_Text('name_en');
     $_nameen->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_sex = new Zend_Form_Element_Select('sex');
     $_sex->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt_status = $db->getVewOptoinTypeByType(1, 1);
     unset($opt_status[-1]);
     unset($opt_status['']);
     $_sex->setMultiOptions($opt_status);
     $_situ_status = new Zend_Form_Element_Select('status');
     $_situ_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $home = new Zend_Form_Element_Text('home');
     $home->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $group_num = new Zend_Form_Element_Text('group_num');
     $group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $i_group_num = new Zend_Form_Element_Text('igroup_num');
     $i_group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $country = new Zend_Form_Element_Select('country');
     $country->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $row = $db->getAllCountry();
     $opt_country = array();
     if (!empty($row)) {
         foreach ($row as $rs) {
             $opt_country[$rs['id']] = $rs['country_name'];
         }
     }
     $country->setMultiOptions($opt_country);
     $state = new Zend_Form_Element_Text('state');
     $state->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $commune = new Zend_Form_Element_Text('commune');
     $commune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $district = new Zend_Form_Element_Text('district');
     $district->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $icommune = new Zend_Form_Element_Text('zip');
     $icommune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $city = new Zend_Form_Element_Text('city');
     $city->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $province = new Zend_Form_Element_Select('province');
     $province->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $opt = $db->getAllProvince(1);
     $province->setMultiOptions($opt);
     $_street = new Zend_Form_Element_Text('street');
     $_street->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address1 = new Zend_Form_Element_Text('address1');
     $address1->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id_type = new Zend_Form_Element_Select('id_type');
     $_id_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $address = new Zend_Form_Element_Text('address');
     $address->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_phone = new Zend_Form_Element_Text('phone');
     $_phone->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $job = new Zend_Form_Element_Text('job');
     $job->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $national_id = new Zend_Form_Element_Text('national_id');
     $national_id->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $email = new Zend_Form_Element_Text('email');
     $email->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $iemail = new Zend_Form_Element_Text('iemail');
     $iemail->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $fax = new Zend_Form_Element_Text('fax');
     $fax->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $balance = new Zend_Form_Element_Text('balance');
     $balance->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_id = new Zend_Form_Element_Hidden("id");
     $_desc = new Zend_Form_Element_Text('desc');
     $_desc->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status = new Zend_Form_Element_Select('status');
     $_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $_status->setMultiOptions($_status_opt);
     $_title = new Zend_Form_Element_Select('title');
     $_title->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $_status_opt = array(1 => $this->tr->translate("Mr."), 2 => $this->tr->translate("Ms"), 3 => $this->tr->translate("Miss"));
     $_title->setMultiOptions($_status_opt);
     $customer_type = new Zend_Form_Element_Select('customer_type');
     $customer_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;'));
     $_status_opt = array(1 => $this->tr->translate("Self"), 2 => $this->tr->translate("Agency"));
     $customer_type->setMultiOptions($_status_opt);
     $nationality = new Zend_Form_Element_Text('nationality');
     $nationality->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $company_name = new Zend_Form_Element_Text('company_name');
     $company_name->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $passport = new Zend_Form_Element_Text('passport');
     $passport->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
     $p_issuedate = new Zend_Form_Element_Text('pissue_date');
     $p_issuedate->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:lynacr,代码行数:101,代码来源:FrmBooking.php

示例7: addPartner

 public function addPartner($data = NULL)
 {
     $_db = new Application_Model_DbTable_DbGlobal();
     $id = new Zend_Form_Element_Hidden('id');
     /* 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("SEARCH INFO")));
     $_title->setValue($request->getParam("adv_search"));
     $_status_search = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
     $_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("status_search"));
     $_btn_search = new Zend_Dojo_Form_Element_SubmitButton('btn_search');
     $_btn_search->setAttribs(array('dojoType' => 'dijit.form.Button', 'iconclass' => 'dijitIconSearch'));
     //////-------------------------------
     $mainbranch = new Zend_Dojo_Form_Element_FilteringSelect('main_branch');
     $mainbranch->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $db = new Partner_Model_DbTable_DbPartner();
     $opt = $db->getNamePartnerparent(null, 1);
     $mainbranch->setMultiOptions($opt);
     $mainbranch->setValue($request->getParam('main_branch'));
     $rows_provice = $_db->getAllProvince();
     $opt_province = "";
     $opt_province = array('-1' => "------Select Province------");
     if (!empty($rows_provice)) {
         foreach ($rows_provice as $row) {
             $opt_province[$row['id']] = $row['name'];
         }
     }
     $province_name = new Zend_Dojo_Form_Element_FilteringSelect('province_name');
     $province_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'onchange' => 'filterDistrict();'));
     $province_name->setMultiOptions($opt_province);
     $province_name->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'required' => 'true'));
     //------------------------------------------------------------------------
     $branchname = new Zend_Dojo_Form_Element_ValidationTextBox('branch_name');
     $branchname->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
     $cade_number = new Zend_Dojo_Form_Element_TextBox('cade_number');
     $cade_number->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
     $partnername = new Zend_Dojo_Form_Element_TextBox('partner_name');
     $partnername->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'Required' => true));
     $photo = new Zend_Form_Element_File('photo');
     $photo->setAttribs(array());
     $id_accournnumber = $db->getNewAccountNumber(1);
     $accournnumber = new Zend_Dojo_Form_Element_TextBox('account_number');
     $accournnumber->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'readonly' => 'readonly', 'style' => 'color:red;'));
     $accournnumber->setValue($id_accournnumber);
     $Address = new Zend_Dojo_Form_Element_TextBox('address');
     $Address->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $homenumber = new Zend_Dojo_Form_Element_TextBox('home_number');
     $homenumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $groupnumber = new Zend_Dojo_Form_Element_TextBox('group_number');
     $groupnumber->setAttribs(array('dojoType' => 'dijit.form.TextBox'));
     $streetnumber = new Zend_Dojo_Form_Element_TextBox('street_number');
     $streetnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $communnumber = new Zend_Dojo_Form_Element_ValidationTextBox('commun_number');
     $communnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'required' => true));
     $phonenumber = new Zend_Dojo_Form_Element_TextBox('phone_number');
     $phonenumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $faxnumber = new Zend_Dojo_Form_Element_TextBox('fax_number');
     $faxnumber->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $salephone = new Zend_Dojo_Form_Element_TextBox('sele_phone');
     $salephone->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox'));
     $status = new Zend_Dojo_Form_Element_FilteringSelect('status');
     $status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $opt = array(1 => 'ប្រើប្រាស់', 0 => 'មិនបានប្រើប្រាស់');
     $status->setMultiOptions($opt);
     $note = new Zend_Dojo_Form_Element_SimpleTextarea('note');
     $note->setAttribs(array('dojoType' => 'dijit.form.SimpleTextarea'));
     $money_usa = new Zend_Dojo_Form_Element_NumberTextBox('money_usa');
     $money_usa->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'required' => true));
     $money_usa->setValue(0);
     $money_bath = new Zend_Dojo_Form_Element_NumberTextBox('money_bath');
     $money_bath->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'Required' => true));
     $money_bath->setValue(0);
     $money_real = new Zend_Dojo_Form_Element_NumberTextBox('money_riel');
     $money_real->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'Required' => true));
     $money_real->setValue(0);
     $status_getmoney = new Zend_Dojo_Form_Element_FilteringSelect('status_getmoney');
     $status_getmoney->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $opt_status = array(1 => 'ដៃគូមេ', 2 => 'ដៃគូកូន');
     $status_getmoney->setMultiOptions($opt_status);
     $status_tran = new Zend_Dojo_Form_Element_FilteringSelect('tran_type');
     $status_tran->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect'));
     $status_option = array(1 => 'ប្រើប្រាស់សាច់ប្រាក់', 2 => 'ទូទាត់ខាងក្រៅ');
     $status_tran->setMultiOptions($status_option);
     $date = new Zend_Dojo_Form_Element_DateTextBox('date');
     $date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox'));
     $date->setValue(date('Y-m-d'));
     $from_date = new Zend_Dojo_Form_Element_DateTextBox('start_date');
     $from_date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'required' => 'true', 'class' => 'fullside', 'onchange' => 'CalculateDate();'));
     $_date = $request->getParam("start_date");
     if (empty($_date)) {
         $_date = date('Y-m-01');
     }
     $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");
//.........这里部分代码省略.........
开发者ID:samlanh,项目名称:currencyms,代码行数:101,代码来源:FrmPartner.php

示例8: showItemForm

 public function showItemForm($data = null)
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     $nameElement = new Zend_Form_Element_Text('name');
     $nameElement->setAttribs(array('class' => 'validate[required]'));
     $this->addElement($nameElement);
     $codeElement = new Zend_Form_Element_Text('item_code');
     $this->addElement($codeElement);
     $statusElement = new Zend_Form_Element_Select('status');
     $statusElement->setMultiOptions(array(1 => $tr->translate("ACTIVE"), 2 => $tr->translate("INACTIVE")));
     $this->addElement($statusElement);
     $saleStartdateElement = new Zend_Form_Element_Text('sale_startdate');
     $this->addElement($saleStartdateElement);
     $saleEnddateElement = new Zend_Form_Element_Text('sale_enddate');
     $this->addElement($saleEnddateElement);
     $rowsUnit = $db->getGlobalDb('SELECT id, name FROM rsmk_productunit');
     $optionsUnit = array();
     if ($rowsUnit) {
         foreach ($rowsUnit as $readUnit) {
             $optionsUnit[$readUnit['id']] = $readUnit['name'];
         }
     }
     $usageUnitElement = new Zend_Form_Element_Select('usage_unit');
     $usageUnitElement->setAttribs(array('class' => 'validate[required]'));
     $usageUnitElement->setMultiOptions($optionsUnit);
     $this->addElement($usageUnitElement);
     $qtyPerUnitElement = new Zend_Form_Element_Text('qty_per_unit');
     $qtyPerUnitElement->setAttribs(array('class' => 'validate[custom[number]]'));
     $this->addElement($qtyPerUnitElement);
     $unitPriceElement = new Zend_Form_Element_Text('unit_price');
     $unitPriceElement->setAttribs(array('class' => 'validate[custom[number]]'));
     $this->addElement($unitPriceElement);
     $itemImageElement = new Zend_Form_Element_File('item_image');
     if ($data == null) {
         $itemImageElement->setAttribs(array('class' => 'validate[required]'));
     }
     $this->addElement($itemImageElement);
     $descriptionElement = new Zend_Form_Element_Textarea('description');
     $this->addElement($descriptionElement);
     // Select Element which get data from other Table
     $rows = $db->getGlobalDb('SELECT id, name FROM rsmk_product');
     $options = array();
     if ($rows) {
         foreach ($rows as $read) {
             $options[$read['id']] = $read['name'];
         }
     }
     $productElement = new Zend_Form_Element_Select('product_id');
     $productElement->setMultiOptions($options);
     $this->addElement($productElement);
     // Select Element which get data from table category
     $rowsCategory = $db->getGlobalDb('SELECT CategoryId, Name FROM tb_category');
     $optionsCategory = array();
     if ($rowsCategory) {
         foreach ($rowsCategory as $readCategory) {
             $optionsCategory[$readCategory['CategoryId']] = $readCategory['Name'];
         }
     }
     $categoryElement = new Zend_Form_Element_Select('category');
     $categoryElement->setMultiOptions($optionsCategory);
     $this->addElement($categoryElement);
     Application_Form_DateTimePicker::addDateField(array('sale_startdate', 'sale_enddate'));
     //set value when edit
     if ($data != null) {
         $idElement = new Zend_Form_Element_Hidden('pr');
         $this->addElement($idElement);
         $idElement->setValue($data['pro_id']);
         $nameElement->setValue($data['name']);
         $codeElement->setValue($data['item_code']);
         $statusElement->setValue($data['status']);
         $saleStartdateElement->setValue($data['sale_startdate']);
         $saleEnddateElement->setValue($data['sale_enddate']);
         $usageUnitElement->setValue($data['usage_unit']);
         $qtyPerUnitElement->setValue($data['qty_per_unit']);
         $unitPriceElement->setValue($data['unit_price']);
         $itemImageElement->setValue($data['item_image']);
         $descriptionElement->setValue($data['description']);
         $productElement->setValue($data['product_id']);
         $categoryElement->setValue($data['category_id']);
         //$stockElement->setValue($data['stock_id']);
     }
     return $this;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:84,代码来源:FrmProduct.php


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