How to change fieldset toggle icon?
By : DMohan
Date : March 29 2020, 07:55 AM
Does that help I want to change the default triangle toggle icon to '+' / '-' , The correct way to do it is this: code :
.legendFieldSet .x-tool-toggle {
background-position: 0 -255px !important; /*the minus sign*/
}
.legendFieldSet.x-fieldset-collapsed .x-tool-toggle {
background-position: 0 -240px !important; /*the plus sign*/
}
|
Toggle fieldset disabled by checking checkbox
By : Helano
Date : March 29 2020, 07:55 AM
hope this fix your issue Yout code is okay. The problem is in your fiddle. When you select onLoad and no No library it means that your javascript code will be placed inside window.onload closure: code :
window.onload = function() { /* your code will go here */ }
|
ZF2 + Doctrine2 - Fieldset in Fieldset of a Collection in Fieldset does not validate properly
By : Muhammet Tamtam
Date : March 29 2020, 07:55 AM
With these it helps After another day of debugging (and swearing), I found the answer! This SO question helped me out by pointing me towards the Zend CollectionInputFilter. code :
class LocationFieldsetInputFilterFactory extends AbstractFieldsetInputFilterFactory
{
/**
* @param ServiceLocatorInterface|ControllerManager $serviceLocator
* @return InputFilter
*/
public function createService(ServiceLocatorInterface $serviceLocator)
{
parent::setupRequirements($serviceLocator, Location::class);
/** @var AddressFieldsetInputFilter $addressFieldsetInputFilter */
$addressFieldsetInputFilter = $this->getServiceManager()->get('InputFilterManager')
->get(AddressFieldsetInputFilter::class);
$collectionInputFilter = new CollectionInputFilter();
$collectionInputFilter->setInputFilter($addressFieldsetInputFilter); // Make sure to add the FieldsetInputFilter that is to be used for the Entities!
return new LocationFieldsetInputFilter(
$collectionInputFilter, // New
// $addressFieldsetInputFilter, // Removed
$this->getEntityManager(),
$this->getTranslator()
);
}
}
class LocationFieldsetInputFilter extends AbstractFieldsetInputFilter
{
// Removed
// /** @var AddressFieldsetInputFilter $addressFieldsetInputFilter */
// protected $addressFieldsetInputFilter ;
// New
/** @var CollectionInputFilter $addressCollectionInputFilter */
protected $addressCollectionInputFilter;
public function __construct(
CollectionInputFilter $addressCollectionInputFilter, // New
// AddressFieldsetInputFilter $filter, // Removed
EntityManager $objectManager,
Translator $translator
) {
// $this->addressFieldsetInputFilter = $filter; // Removed
$this->addressCollectionInputFilter = $addressCollectionInputFilter; // New
parent::__construct([
'object_manager' => $objectManager,
'object_repository' => $objectManager->getRepository(Location::class),
'translator' => $translator,
]);
}
/**
* Sets LocationFieldset Element validation
*/
public function init()
{
parent::init();
// $this->add($this->addressFieldsetInputFilter, 'addresses'); // Removed
$this->add($this->addressCollectionInputFilter, 'addresses'); // New
$this->add([
'name' => 'name',
'required' => true,
'filters' => [
['name' => StringTrim::class],
['name' => StripTags::class],
],
'validators' => [
[
'name' => StringLength::class,
'options' => [
'min' => 3,
'max' => 255,
],
],
],
]);
}
}
|
How to toggle the mat-toggle-button based on user input as well as toggle-button?
By : VIP
Date : March 29 2020, 07:55 AM
|
How can I hide a fieldset (and disable the associated ASP.NET validation for that fieldset) based on a radio button sele
By : gsd82
Date : March 29 2020, 07:55 AM
|