openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 4aec32a1d547f21c31204e5b5520415b64aaaa5f
parent 19617dfb06a4c0f83d9ab81164ce762230a73c40
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  9 Mar 2018 22:23:17 +0100

Fix: Language-Id beim Bearbeiten von Inhalten durchreichen.

Diffstat:
modules/cms-core/action/PageelementAction.class.php | 54+++++++++++++++++++++---------------------------------
modules/cms-ui/themes/default/html/views/pageelement/edit.php | 434+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/pageelement/edit.tpl.src.xml | 1+
3 files changed, 456 insertions(+), 33 deletions(-)

diff --git a/modules/cms-core/action/PageelementAction.class.php b/modules/cms-core/action/PageelementAction.class.php @@ -2,6 +2,7 @@ namespace cms\action; +use cms\model\Project; use cms\model\User; use cms\model\Value; use cms\model\Element; @@ -113,8 +114,7 @@ class PageelementAction extends Action */ public function propView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->page = $this->page; @@ -151,8 +151,7 @@ class PageelementAction extends Action */ public function infoView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->page = $this->page; @@ -189,8 +188,7 @@ class PageelementAction extends Action */ public function structureView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->page = $this->page; @@ -216,8 +214,7 @@ class PageelementAction extends Action */ public function editView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->element = &$this->element; @@ -232,6 +229,7 @@ class PageelementAction extends Action $this->setTemplateVar('name' ,$this->value->element->name ); $this->setTemplateVar('desc' ,$this->value->element->desc ); $this->setTemplateVar('elementid',$this->value->element->elementid); + $this->setTemplateVar('languageid',$this->value->languageid ); $this->setTemplateVar('type' ,$this->value->element->type ); $this->setTemplateVar('value_time',time() ); @@ -262,8 +260,7 @@ class PageelementAction extends Action */ public function previewView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->element = &$this->element; @@ -532,8 +529,7 @@ class PageelementAction extends Action function linkView() { - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = $this->page->pageid; $this->value->element = &$this->element; @@ -717,7 +713,7 @@ class PageelementAction extends Action if ( $this->element->wiki ) { - $project = Session::getProject(); + $project = new Project( $this->page->projectid ); $languages = $project->getLanguages(); if ( count($languages) > 1 ) @@ -824,8 +820,7 @@ class PageelementAction extends Action $this->value->page = &$this->page; $this->value->simple = true; - $language = Session::getProjectLanguage(); - $this->value->languageid = $language->languageid; + $this->value->languageid = $this->page->languageid; $this->value->objectid = $this->page->objectid; $this->value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); $this->value->element = &$this->element; @@ -956,7 +951,7 @@ class PageelementAction extends Action $type = $this->element->type; if ( empty($type)) - die('Error: No element type available.'); + throw new \InvalidArgumentException('No element type available'); $funktionName = 'save'.$type; @@ -973,8 +968,7 @@ class PageelementAction extends Action private function savetext() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); @@ -1033,7 +1027,7 @@ class PageelementAction extends Action // fuer jede Sprache einzeln gespeichert. if ( $value->element->allLanguages ) { - $project = Session::getProject(); + $project = new Project( $this->page->projectid ); foreach( $project->getLanguageIds() as $languageid ) { $value->languageid = $languageid; @@ -1067,8 +1061,7 @@ class PageelementAction extends Action { global $conf; $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); @@ -1191,8 +1184,7 @@ class PageelementAction extends Action private function savedate() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); @@ -1235,8 +1227,7 @@ class PageelementAction extends Action private function saveselect() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); @@ -1264,15 +1255,14 @@ class PageelementAction extends Action private function savelink() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); if ( $this->hasRequestVar('elementid') ) - $value->element = new Element( $this->getRequestVar('elementid') ); + $value->element = new Element( $this->getRequestVar('elementid') ); else - $value->element = Session::getElement(); + $value->element = Session::getElement(); $value->element->load(); $value->publish = false; @@ -1308,8 +1298,7 @@ class PageelementAction extends Action private function saveinsert() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); @@ -1337,8 +1326,7 @@ class PageelementAction extends Action private function savenumber() { $value = new Value(); - $language = Session::getProjectLanguage(); - $value->languageid = $language->languageid; + $value->languageid = $this->page->languageid; $value->objectid = $this->page->objectid; $value->pageid = Page::getPageIdFromObjectId( $this->page->objectid ); diff --git a/modules/cms-ui/themes/default/html/views/pageelement/edit.php b/modules/cms-ui/themes/default/html/views/pageelement/edit.php @@ -0,0 +1,433 @@ + + + <div class="headermenu"><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_LINK') ?>" data-type="dialog" data-name="<?php echo lang('MENU_LINK') ?>" data-method="link"><img src="./themes/default/images/icon/action/link.svg" title="<?php echo lang('MENU_link_DESC') ?>" /><?php echo lang('MENU_link') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_IMPORT') ?>" data-type="dialog" data-name="<?php echo lang('MENU_IMPORT') ?>" data-method="import"><img src="./themes/default/images/icon/action/import.svg" title="<?php echo lang('MENU_import_DESC') ?>" /><?php echo lang('MENU_import') ?></a></div><div class="toolbar-icon clickable"><a href="javascript:void(0);" title="<?php echo lang('MENU_EXPORT') ?>" data-type="dialog" data-name="<?php echo lang('MENU_EXPORT') ?>" data-method="export"><img src="./themes/default/images/icon/action/export.svg" title="<?php echo lang('MENU_export_DESC') ?>" /><?php echo lang('MENU_export') ?></a></div></div> + + <form name="" target="_self" action="<?php echo OR_ACTION ?>" data-method="<?php echo OR_METHOD ?>" data-action="<?php echo OR_ACTION ?>" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="<?php echo OR_ACTION ?>" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo OR_ACTION ?>" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo OR_METHOD ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_languageid" name="languageid<?php if ('') echo '_disabled' ?>" type="hidden" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$languageid) ?>" /><?php if ('') { ?><input type="hidden" name="languageid" value="<?php $languageid ?>"/><?php } ?></div> + + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_elementid" name="elementid<?php if ('') echo '_disabled' ?>" type="hidden" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$elementid) ?>" /><?php if ('') { ?><input type="hidden" name="elementid" value="<?php $elementid ?>"/><?php } ?></div> + + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_value_time" name="value_time<?php if ('') echo '_disabled' ?>" type="hidden" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$value_time) ?>" /><?php if ('') { ?><input type="hidden" name="value_time" value="<?php $value_time ?>"/><?php } ?></div> + + + <span class="help"><?php echo nl2br(encodeHtml(htmlentities($desc))); ?></span> + + <?php $if4=($type=='date'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('calendar') ?></legend><div> + <div> + <table class="calendar" width="85%"> + <tr> + <td colspan="8" class="help"> + <a target="_self" data-url="<?php echo $lastmonthurl ?>" data-action="" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/left.png" /> + + </a> + + <span class="text"><?php echo nl2br('&nbsp;'); ?></span> + + <strong class="text"><?php echo nl2br(encodeHtml(htmlentities($monthname))); ?></strong> + + <span class="text"><?php echo nl2br('&nbsp;'); ?></span> + + <a target="_self" data-url="<?php echo $nextmonthurl ?>" data-action="" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/right.png" /> + + </a> + + <span class="text"><?php echo nl2br('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'); ?></span> + + <a target="_self" data-url="<?php echo $lastyearurl ?>" data-action="" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/left.png" /> + + </a> + + <span class="text"><?php echo nl2br('&nbsp;'); ?></span> + + <strong class="text"><?php echo nl2br(encodeHtml(htmlentities($yearname))); ?></strong> + + <span class="text"><?php echo nl2br('&nbsp;'); ?></span> + + <a target="_self" data-url="<?php echo $nextyearurl ?>" data-action="" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/right.png" /> + + </a> + + </td> + </tr> + <tr> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'week'.'')))); ?></span> + + </td> + <?php foreach($weekdays as $list_key=>$weekday){ ?> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($weekday))); ?></span> + + </td> + <?php } ?> + </tr> + <?php foreach($weeklist as $weeknr=>$week){ ?> + <tr> + <td width="12%"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($weeknr))); ?></span> + + </td> + <?php foreach($week as $list_key=>$list_value){ ?><?php extract($list_value) ?> + <td width="12%"> + <?php $if12=(empty($url)); if($if12){?> + <span class="text"><?php echo nl2br('&nbsp;&nbsp;'); ?></span> + + <strong class="text"><?php echo nl2br(encodeHtml(htmlentities($nr))); ?></strong> + + <span class="text"><?php echo nl2br('&nbsp;&nbsp;'); ?></span> + + <?php } ?> + <?php $if12=!(empty($url)); if($if12){?> + <a target="_self" data-url="<?php echo $url ?>" data-action="" data-method="<?php echo OR_METHOD ?>" data-id="<?php echo OR_ID ?>" href="javascript:void(0);"> + <span class="text"><?php echo nl2br('&nbsp;&nbsp;'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($nr))); ?></span> + + <span class="text"><?php echo nl2br('&nbsp;&nbsp;'); ?></span> + + </a> + + <?php } ?> + <?php $if12=($today); if($if12){?> + <span class="text"><?php echo nl2br('*'); ?></span> + + <?php } ?> + </td> + <?php } ?> + </tr> + <?php } ?> + </table> + </div> + </div></fieldset> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('date') ?></legend><div> + <div> + <label for="<?php echo REQUEST_ID ?>_year" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'date'.'')))); ?></span> + + </label> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_year" name="year" title="" class=""<?php if (count($all_years)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_years,$year,0,0) ?><?php if (count($all_years)==0) { ?><input type="hidden" name="year" value="" /><?php } ?><?php if (count($all_years)==1) { ?><input type="hidden" name="year" value="<?php echo array_keys($all_years)[0] ?>" /><?php } ?> + </select></div> + <span class="text"><?php echo nl2br('&nbsp;-&nbsp;'); ?></span> + + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_month" name="month" title="" class=""<?php if (count($all_months)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_months,$month,0,0) ?><?php if (count($all_months)==0) { ?><input type="hidden" name="month" value="" /><?php } ?><?php if (count($all_months)==1) { ?><input type="hidden" name="month" value="<?php echo array_keys($all_months)[0] ?>" /><?php } ?> + </select></div> + <span class="text"><?php echo nl2br('&nbsp;-&nbsp;'); ?></span> + + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_day" name="day" title="" class=""<?php if (count($all_days)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_days,$day,0,0) ?><?php if (count($all_days)==0) { ?><input type="hidden" name="day" value="" /><?php } ?><?php if (count($all_days)==1) { ?><input type="hidden" name="day" value="<?php echo array_keys($all_days)[0] ?>" /><?php } ?> + </select></div> + </div> + <div> + <label for="<?php echo REQUEST_ID ?>_hour" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'date_time'.'')))); ?></span> + + </label> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_hour" name="hour" title="" class=""<?php if (count($all_hours)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_hours,$hour,0,0) ?><?php if (count($all_hours)==0) { ?><input type="hidden" name="hour" value="" /><?php } ?><?php if (count($all_hours)==1) { ?><input type="hidden" name="hour" value="<?php echo array_keys($all_hours)[0] ?>" /><?php } ?> + </select></div> + <span class="text"><?php echo nl2br('&nbsp;-&nbsp;'); ?></span> + + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_minute" name="minute" title="" class=""<?php if (count($all_minutes)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_minutes,$minute,0,0) ?><?php if (count($all_minutes)==0) { ?><input type="hidden" name="minute" value="" /><?php } ?><?php if (count($all_minutes)==1) { ?><input type="hidden" name="minute" value="<?php echo array_keys($all_minutes)[0] ?>" /><?php } ?> + </select></div> + <span class="text"><?php echo nl2br('&nbsp;-&nbsp;'); ?></span> + + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_second" name="second" title="" class=""<?php if (count($all_seconds)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($all_seconds,$second,0,0) ?><?php if (count($all_seconds)==0) { ?><input type="hidden" name="second" value="" /><?php } ?><?php if (count($all_seconds)==1) { ?><input type="hidden" name="second" value="<?php echo array_keys($all_seconds)[0] ?>" /><?php } ?> + </select></div> + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='text'); if($if4){?> + <tr> + <td colspan="2"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_text" name="text<?php if ('') echo '_disabled' ?>" type="text" maxlength="255" class="text" value="<?php echo Text::encodeHtml(@$text) ?>" /><?php if ('') { ?><input type="hidden" name="text" value="<?php $text ?>"/><?php } ?></div> + + + + </td> + </tr> + <?php } ?> + <?php $if4=($type=='longtext'); if($if4){?> + <?php $if5=(!empty($preview)); if($if5){?> + <div class="preview"> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('page_preview') ?></legend><div> + <span class="text"><?php echo nl2br($preview); ?></span> + + </div></fieldset> + </div> + <?php } ?> + <?php $if5=($editor=='html'); if($if5){?> + <textarea name="text" class="editor__html-editor" id="pageelement_edit_editor"><?php echo ${'text'} ?></textarea> + + <?php } ?> + <?php $if5=($editor=='wiki'); if($if5){?> + <?php $if6=(!empty($languagetext)); if($if6){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo $languagename ?></legend><div> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($languagetext))); ?></span> + + </div></fieldset> + <br/> + + <br/> + + <?php } ?> + <textarea name="text" class="editor__wiki-editor"><?php echo ${'text'} ?></textarea> + + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('help') ?></legend><div> + <table width="100%"> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','strong-begin')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'text_markup_strong'.'')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','strong-end')))); ?></span> + + <br/> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','emphatic-begin')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'text_markup_emphatic'.'')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','emphatic-end')))); ?></span> + + </td> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','list-numbered')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'text_markup_numbered_list'.'')))); ?></span> + + <br/> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','list-numbered')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <br/> + + </td> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','list-unnumbered')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'text_markup_unnumbered_list'.'')))); ?></span> + + <br/> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','list-unnumbered')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <br/> + + </td> + <td> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'text_markup_table'.'')))); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <br/> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <span class="text"><?php echo nl2br('...'); ?></span> + + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(config('editor','text-markup','table-cell-sep')))); ?></span> + + <br/> + + </td> + </table> + </div></fieldset> + <?php } ?> + <?php $if5=($editor=='text'); if($if5){?> + <div class="inputholder"><textarea class="longtext" name="text"><?php echo Text::encodeHtml($text) ?></textarea></div> + + + + <?php } ?> + <?php } ?> + <?php $if4=($type=='link'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_linkobjectid" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'link_target'.'')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="selector"> +<div class="inputholder"> +<input type="hidden" name="linkobjectid" value="{id}" /> +<input type="text" disabled="disabled" value="{name}" /> +</div> +<div class="tree selector" data-types="{types}" data-init-id="<?php echo $linkobjectid ?>" data-init-folderid="<?php echo $rootfolderid ?>"> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_link_url" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'link_url'.'')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_linkurl" name="linkurl<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$linkurl) ?>" /><?php if ('') { ?><input type="hidden" name="linkurl" value="<?php $linkurl ?>"/><?php } ?></div> + + </div> + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='list'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_linkobjectid" name="linkobjectid" title="" class=""<?php if (count($objects)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($objects,$linkobjectid,0,0) ?><?php if (count($objects)==0) { ?><input type="hidden" name="linkobjectid" value="" /><?php } ?><?php if (count($objects)==1) { ?><input type="hidden" name="linkobjectid" value="<?php echo array_keys($objects)[0] ?>" /><?php } ?> + </select></div> + + + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='insert'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_linkobjectid" name="linkobjectid" title="" class=""<?php if (count($objects)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($objects,$linkobjectid,0,0) ?><?php if (count($objects)==0) { ?><input type="hidden" name="linkobjectid" value="" /><?php } ?><?php if (count($objects)==1) { ?><input type="hidden" name="linkobjectid" value="<?php echo array_keys($objects)[0] ?>" /><?php } ?> + </select></div> + + + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='number'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div> + <input type="hidden" name="decimals" value="decimals"/> + + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_number" name="number<?php if ('') echo '_disabled' ?>" type="text" maxlength="20" class="text" value="<?php echo Text::encodeHtml(@$number) ?>" /><?php if ('') { ?><input type="hidden" name="number" value="<?php $number ?>"/><?php } ?></div> + + + + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='select'); if($if4){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><div> + <div> + <div class="inputholder"><select id="<?php echo REQUEST_ID ?>_text" name="text" title="" class=""<?php if (count($items)<=1) echo ' disabled="disabled"'; ?> size=1"><?php include_once( 'modules/template-engine/components/html/selectbox/component-select-box.php') ?><?php component_select_option_list($items,$text,0,0) ?><?php if (count($items)==0) { ?><input type="hidden" name="text" value="" /><?php } ?><?php if (count($items)==1) { ?><input type="hidden" name="text" value="<?php echo array_keys($items)[0] ?>" /><?php } ?> + </select></div> + + + </div> + </div></fieldset> + <?php } ?> + <?php $if4=($type=='longtext'); if($if4){?> + <?php $if5=($editor=='wiki'); if($if5){?> + <?php $if6=(!empty($languages)); if($if6){?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('editor_show_language') ?></legend><div> + <div> + <?php foreach($languages as $languageid=>$languagename){ ?> + <input class="radio" type="radio" id="<?php echo REQUEST_ID ?>_otherlanguageid_<?php echo $languageid ?>" name="otherlanguageid" value="<?php echo $languageid ?>"<?php if($languageid==@$otherlanguageid)echo ' checked="checked"' ?> /> + + <label for="<?php echo REQUEST_ID ?>_<?php echo 'otherlanguageid_'.$languageid.'' ?>" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($languagename))); ?></span> + + </label> + <br/> + + <?php } ?> + </div> + </div></fieldset> + <?php } ?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('PAGE_PREVIEW') ?></legend><div> + <div> + <?php { $tmpname = 'preview';$default = '';$readonly = ''; + if ( isset($$tmpname) ) + $checked = $$tmpname; + else + $checked = $default; + + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_preview" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'PAGE_PREVIEW'.'')))); ?></span> + + </label> + </div> + </div></fieldset> + <?php } ?> + <?php } ?> + <fieldset class="<?php echo '1'?" open":"" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow-right closed" /><div class="arrow-down open" /><?php echo lang('options') ?></legend><div> + <?php $if5=(!empty($release)); if($if5){?> + <div> + <?php { $tmpname = 'release';$default = '';$readonly = ''; + if ( isset($$tmpname) ) + $checked = $$tmpname; + else + $checked = $default; + + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_release" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_RELEASE')))); ?></span> + + </label> + </div> + <?php } ?> + <?php $if5=(!empty($publish)); if($if5){?> + <div> + <?php { $tmpname = 'publish';$default = '';$readonly = ''; + if ( isset($$tmpname) ) + $checked = $$tmpname; + else + $checked = $default; + + ?><input class="checkbox" type="checkbox" id="<?php echo REQUEST_ID ?>_<?php echo $tmpname ?>" name="<?php echo $tmpname ?>" <?php if ($readonly) echo ' disabled="disabled"' ?> value="1" <?php if( $checked ) echo 'checked="checked"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_publish" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('PAGE_PUBLISH_AFTER_SAVE')))); ?></span> + + </label> + </div> + <?php } ?> + </div></fieldset> + + <div class="bottom"><div class="command yes"><input type="button" class="submit ok" value="<?php echo lang('save') ?>" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/pageelement/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/pageelement/edit.tpl.src.xml @@ -2,6 +2,7 @@ xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> <header views="link,import,export"></header> <form method="post" label="message:save" visible="yes"> + <input type="hidden" name="languageid"></input> <input type="hidden" name="elementid"></input> <input type="hidden" name="value_time"></input> <window name="element">