Skip to content

Commit

Permalink
Merge pull request #50 from FriendsOfREDAXO/defaults
Browse files Browse the repository at this point in the history
Profile: Sinnvolle Default-Werte aus der README.md übernommen
  • Loading branch information
alxndr-w authored Jun 4, 2024
2 parents 1bbe1c8 + 8def691 commit 9462034
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pages/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,26 @@

$field = $form->addTextField('name');
$field->setLabel(rex_i18n::msg('redactor_profile_name'));
if($field->getValue() === null) {
$field->setValue("default");
}

$field = $form->addTextField('description');
$field->setLabel(rex_i18n::msg('redactor_profile_description'));


$field = $form->addTextField('min_height');
$field->setLabel(rex_i18n::msg('redactor_profile_min_height'));
if($field->getValue() === null) {
$field->setValue("200");
}

$field = $form->addTextField('max_height');
$field->setLabel(rex_i18n::msg('redactor_profile_max_height'));
if($field->getValue() === null) {
$field->setValue("600");
}


$field = $form->addSelectField('plugin_counter');
$field->setLabel(rex_i18n::msg('redactor_profile_plugin_counter'));
Expand All @@ -87,6 +98,9 @@
$field = $form->addTextAreaField('plugins');
$field->setLabel(rex_i18n::msg('redactor_profile_plugins'));
$field->setNotice(rex_i18n::msg('redactor_profile_plugins_notice'));
if($field->getValue() === null) {
$field->setValue("html,undo,|,redo,h1,h2,h3,h4,bold,italic,|,image,blockquote,lists[indent],ol,ul,linkExternal,linkInternal,hr,linkYForm[rex_yform_test=last_name|rex_yform_news=title],table,widget");
}

$field = $form->addTextAreaField('settings');
$field->setAttribute('class', 'form-control codemirror');
Expand Down Expand Up @@ -131,6 +145,7 @@
$content = $list->get();

$fragment = new rex_fragment();
$fragment->setVar('title', $addon->i18n('redactor_profiles'), false);
$fragment->setVar('content', $content, false);
$content = $fragment->parse('core/page/section.php');

Expand Down

0 comments on commit 9462034

Please sign in to comment.