so if i check that checkbox admin will be nonactive, but i need t use active admin hostenter image description here
I want to debug the issue in here symfony 1.4 here is form
<?php
/**
* User form.
*
* @package now
* @subpackage form
* @author Your name here
* @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class UserForm extends BaseUserForm {
public function configure() {
$this->disableCSRFProtection();
unset($this['created_by'], $this['created_at'], $this['updated_at'], $this['updated_by'], $this['phone_number'], $this['position'], $this['group_id']);
$userId=$this->getObject()->getId();
$this->setWidgets(array(
'id' => new sfWidgetFormInputHidden(),
'username' => new sfWidgetFormInputText(),
'password' => new sfWidgetFormInputPassword(),
'again_password' => new sfWidgetFormInputPassword(),
'firstname' => new sfWidgetFormInputText(),
'lastname' => new sfWidgetFormInputText(),
'mobile' => new sfWidgetFormInputText(),
'email' => new sfWidgetFormInputText(),
'user_groups_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'UserGroup', 'expanded' => true)),
'status' => new sfWidgetFormInputCheckbox(array(), array('value' => 1)),
// 'status' => new sfWidgetFormInputCheckbox(array(), array('value' => 1)),
// $this->widgetSchema->setDefaults(array(
// 'status' => 1, ))
));
$required_array = array('required' => true);
$this->setValidators(array(
'id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
'username' => new sfValidatorString($required_array, array('required' => 'Нэвтрэх нэрийг заавал оруулна уу')),
'password' => new sfValidatorString(array('max_length' => 100, 'required' => false)),
'again_password' => new sfValidatorString(array('required' => false)),
'firstname' => new sfValidatorString(array('max_length' => 50, 'required' => true)),
'lastname' => new sfValidatorString(array('max_length' => 50)),
'mobile' => new sfValidatorString(array('max_length' => 255)),
'email' => new sfValidatorEmail(array(), array('invalid' => 'Та имэйл хаягийг зөв оруулна уу', 'required' => 'Та имэйлийг заавал оруулна уу')),
'user_groups_list' => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'UserGroup', 'required' => false)),
'status' => new sfValidatorBoolean(array('required' => false)),
));
// 11f3d53bd59be0c5a1ea7e354516528c
// 5ef0c862efa8ced872fa54c4e9453276
$this->widgetSchema->setNameFormat('user[%s]');
$this->validatorSchema->setPostValidator(new sfValidatorAnd(array(
new sfValidatorDoctrineUnique(array('model' => 'User', 'column' => array('username')), array('invalid' => 'Нэвтрэх нэртэй хэрэглэгч бүртгэгдсэн байна')),
new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'again_password', array(), array('invalid' => 'Нууц үгүүд ижилхэн байх ёстой!'))
)));
// $this->validatorSchema->setPostValidator(
// new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'again_password', array(), array('invalid' => 'Нууц үгүүд ижилхэн байх ёстой!'))
// );
$this->widgetSchema['username']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['password']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['again_password']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['firstname']->setAttributes(array('class' => 'form-control'));
// $this->widgetSchema['status']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['lastname']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['email']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema['mobile']->setAttributes(array('class' => 'form-control'));
$this->widgetSchema->setLabels(
array(
'username' => 'Нэвтрэх нэр:',
'password' => 'Нууц үг:',
'again_password' => 'Нууц үг давтах:',
'firstname' => 'Өөрийн нэр:',
'lastname' => 'Эцгийн нэр:',
'mobile' => 'утас:',
'email' => 'Имэйл:',
'status' => 'Идэвхгүй болгох эсэх:',
'user_groups_list' => 'Хандах эрх:',
));
}
}
i want to know about how to fix the checkbox when i using local server i need to change my admin level and choose active checkbox but it doesn't work eventhough error was called in the status section will need datetime.
Aucun commentaire:
Enregistrer un commentaire