This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Craft.OriginalEntryIndex = Craft.EntryIndex; | |
Craft.EntryIndex = Craft.OriginalEntryIndex.extend({ | |
afterInit: function(){ | |
this.$statusMenuBtn.data("menubtn").menu.$options[1].click(); | |
this.base.apply(this, arguments); | |
} | |
}); | |
delete(Craft._elementIndexClasses["craft\\\elements\\\Entry"]); | |
Craft.registerElementIndexClass("craft\\\elements\\\Entry", Craft.EntryIndex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Craft::$app->getView()->hook( | |
/** | |
* @param array $context | |
*/ | |
'cp.entries.edit', | |
function(array &$context) { | |
/** @var Section $section */ | |
$section = $context['section']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// just a simple migration file to store the information | |
namespace craft\contentmigrations; | |
use Craft; | |
use craft\db\Migration; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$model = new DynamicModel($request->getBodyParams(), [ | |
[ | |
['firstname', 'lastname', 'mail', 'privacy'], | |
'required', | |
'message' => Craft::t('site', "Folgendes Feld Fehlt: {attribute}") | |
] | |
]); | |
$model->addRule('minEntryTimeMethod', static function() use ($model){ | |
if (/* kleiner als 3s */) { | |
$model->addError('title', "Sie haben zu schnell abgesendet"); |
OlderNewer