While we don't exactly know how this pans out, it's code that needs
to be inspected by forcing it to -devel for a while. As far as I
can see, the following applies:
When there are no gateways, they are generated as defaults.
When they are edited, they stay in the config and their e.g.
choice of being disabled should be honoured.
When using opnsense_standard_table_form on a table, the first visible row contains a top border (because the invisible mobile border is placed first).
The change sets border-top-width on the first td,th to 0px and swaps the zebra printing to keep things more consistent.
Needs more fixing/unification with the proper way of doing it,
but for now let these strings trickle through the translation
machinery for maximum effect.
We don't have to do anything here anymore. Since we started using
pkg(8) the extensions.ini was always consistent, but we needed to
make sure that the order is correct. Some more cleverness was added
to no prevent other PHP modules from simply "plugging in", but since
they are not in one extensions.ini anymore it won't matter.
Expecting some splatter during upgrade, but hopefully also no more
php-suhosin clashes with php56-session not loaded. :)
Whitelisting in Suhosin is needed to make this work, but
unfortunately this will disable whitelisting for all of
phar. A pretty debatable design choice, but for now we
keep this on -devel until we know what to do...
Constraints hook into the default validations, new constraints should derive from BaseConstraint.
This commit contains the code needed to add constraints to our model and a unittest for the UniqueConstraint option.
Add the following to a model field, to force uniqueness for a combination of keys:
<Constraints>
<check001> <!--validation name, unique within this field-->
<message>number should be unique</message> <!--the message to output on validation failure -->
<type>OPNsense\Base\Constraints\UniqueConstraint</type> <!--the class to construct, derived from OPNsense\Base\Constraints\BaseConstraint -->
<addFields> <!--optional additional fields for the equation, defined in UniqueConstraint -->
<field1>optfield</field1>
</addFields>
</check001>
</Constraints>