openrat-cms

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

commit 4509ef9d49e526a67096938c11f3e566a7e50bf6
parent 7e4393a9fa27dda3471b9d2ea1d906f839fe9283
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 27 Nov 2018 21:31:00 +0100

Fix: Hinzufügen von neuen Objekten wieder reaktiviert.

Diffstat:
modules/cms-core/action/FolderAction.class.php | 253++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
modules/cms-core/functions/common.inc.php | 11+++++++++++
modules/cms-core/model/BaseObject.class.php | 17+++++++++++------
modules/cms-core/model/File.class.php | 8+++-----
modules/cms-core/model/Folder.class.php | 4++--
modules/cms-core/model/Link.class.php | 8+++-----
modules/cms-core/model/Page.class.php | 15++++++++-------
modules/cms-core/model/Url.class.php | 8+++-----
modules/cms-ui/themes/default/html/views/folder/createfile.php | 8++++----
modules/cms-ui/themes/default/html/views/folder/createfolder.php | 4++--
modules/cms-ui/themes/default/html/views/folder/createlink.php | 8++++----
modules/cms-ui/themes/default/html/views/folder/createpage.php | 4++--
modules/cms-ui/themes/default/html/views/folder/createurl.php | 10+++++-----
modules/cms-ui/themes/default/html/views/link/edit.php | 4++--
modules/cms-ui/themes/default/html/views/link/info.php | 4++--
modules/cms-ui/themes/default/html/views/page/prop.php | 14+++++++-------
modules/cms-ui/themes/default/html/views/url/edit.php | 6+++---
modules/cms-ui/themes/default/html/views/url/info.php | 4++--
modules/cms-ui/themes/default/html/views/url/prop.php | 32++++++++++++++++++++++++++++++++
19 files changed, 318 insertions(+), 104 deletions(-)

diff --git a/modules/cms-core/action/FolderAction.class.php b/modules/cms-core/action/FolderAction.class.php @@ -3,6 +3,7 @@ namespace cms\action; use ArchiveTar; +use cms\model\Image; use cms\model\Language; use cms\model\Project; use cms\model\Template; @@ -12,37 +13,18 @@ use cms\model\BaseObject; use cms\model\File; use cms\model\Link; +use cms\model\Text; use cms\model\Url; use Http; use Publish; use Session; use \Html; -use Text; use Upload; -// OpenRat Content Management System -// Copyright (C) 2002-2012 Jan Dankert, cms@jandankert.de -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - /** - * Action-Klasse zum Bearbeiten eines Ordners - * @author $Author$ - * @version $Revision$ - * @package openrat.actions + * Action-Klasse zum Bearbeiten eines Ordners. + * + * @author Jan Dankert */ class FolderAction extends ObjectAction @@ -92,16 +74,16 @@ class FolderAction extends ObjectAction $this->addNotice('folder',$f->name,'ADDED','ok'); // Die neue Folder-Id (wichtig für API-Aufrufe). - $this->setTemplateVar('objectid',$f->objectid); - } - else - { - $this->addValidationError('name'); - $this->callSubAction('createfolder'); - } + $this->setTemplateVar('objectid',$f->objectid); - $this->folder->setTimestamp(); - } + $this->folder->setTimestamp(); // Zeitstempel setzen. + } + else + { + $this->addValidationError('name'); + } + + } @@ -149,6 +131,7 @@ class FolderAction extends ObjectAction $file->extension = $upload->extension; $file->size = $upload->size; $file->parentid = $this->folder->objectid; + $file->projectid = $this->folder->projectid; $file->value = $upload->value; } @@ -160,6 +143,7 @@ class FolderAction extends ObjectAction $file->desc = $this->getRequestVar('description'); $file->filename = $this->getRequestVar('filename', OR_FILTER_FILENAME); $file->parentid = $this->folder->objectid; + $file->projectid = $this->folder->projectid; } else { @@ -180,6 +164,159 @@ class FolderAction extends ObjectAction + public function createimagePost() + { + $type = $this->getRequestVar('type' ); + $name = $this->getRequestVar('name' ); + $filename = $this->getRequestVar('filename' ); + $description = $this->getRequestVar('description'); + + $image = new Image(); + + // Die neue Datei wird über eine URL geladen und dann im CMS gespeichert. + if ( $this->hasRequestVar('url') ) + { + $url = $this->getRequestVar('url'); + $http = new Http(); + $http->setUrl( $url ); + + $ok = $http->request(); + + if ( !$ok ) + { + $this->addValidationError('url','COMMON_VALIDATION_ERROR',array(),$http->error); + $this->callSubAction('createfile'); + return; + } + + $image->desc = $description; + $image->filename = basename($url); + $image->name = !empty($name)?$name:basename($url); + $image->size = strlen($http->body); + $image->value = $http->body; + $image->parentid = $this->folder->objectid; + } + else + { + $upload = new Upload(); + + if ( $upload->isValid() ) + { + $image->desc = $description; + $image->filename = $upload->filename; + $image->name = !empty($name)?$name:$upload->filename; + $image->extension = $upload->extension; + $image->size = $upload->size; + $image->parentid = $this->folder->objectid; + $image->projectid = $this->folder->projectid; + + $image->value = $upload->value; + } + else + { + if ( $this->hasRequestVar('name') ) + { + $image->name = $this->getRequestVar('name'); + $image->desc = $this->getRequestVar('description'); + $image->filename = $this->getRequestVar('filename', OR_FILTER_FILENAME); + $image->parentid = $this->folder->objectid; + } + else + { + $this->addValidationError('file','COMMON_VALIDATION_ERROR',array(),$upload->error); + $this->callSubAction('createfile'); + return; + } + + } + } + + $image->add(); // Datei hinzufuegen + $this->addNotice('file',$image->name,'ADDED','ok'); + $this->setTemplateVar('objectid',$image->objectid); + + $this->folder->setTimestamp(); + } + + + + public function createtextPost() + { + $type = $this->getRequestVar('type' ); + $name = $this->getRequestVar('name' ); + $filename = $this->getRequestVar('filename' ); + $description = $this->getRequestVar('description'); + + $text = new Text(); + + // Die neue Datei wird über eine URL geladen und dann im CMS gespeichert. + if ( $this->hasRequestVar('url') ) + { + $url = $this->getRequestVar('url'); + $http = new Http(); + $http->setUrl( $url ); + + $ok = $http->request(); + + if ( !$ok ) + { + $this->addValidationError('url','COMMON_VALIDATION_ERROR',array(),$http->error); + $this->callSubAction('createfile'); + return; + } + + $text->desc = $description; + $text->filename = basename($url); + $text->name = !empty($name)?$name:basename($url); + $text->size = strlen($http->body); + $text->value = $http->body; + $text->parentid = $this->folder->objectid; + $text->projectid = $this->folder->projectid; + } + else + { + $upload = new Upload(); + + if ( $upload->isValid() ) + { + $text->desc = $description; + $text->filename = $upload->filename; + $text->name = !empty($name)?$name:$upload->filename; + $text->extension = $upload->extension; + $text->size = $upload->size; + $text->parentid = $this->folder->objectid; + $text->projectid = $this->folder->projectid; + + $text->value = $upload->value; + } + else + { + if ( $this->hasRequestVar('name') ) + { + $text->name = $this->getRequestVar('name'); + $text->desc = $this->getRequestVar('description'); + $text->filename = $this->getRequestVar('filename', OR_FILTER_FILENAME); + $text->parentid = $this->folder->objectid; + } + else + { + $this->addValidationError('file','COMMON_VALIDATION_ERROR',array(),$upload->error); + $this->callSubAction('createfile'); + return; + } + + } + } + + $text->add(); // Datei hinzufuegen + $this->addNotice('file',$text->name,'ADDED','ok'); + $this->setTemplateVar('objectid',$text->objectid); + + $this->folder->setTimestamp(); + } + + + public function createlinkPost() { $name = $this->getRequestVar('name' ); @@ -195,6 +332,7 @@ class FolderAction extends ObjectAction $link->parentid = $this->folder->objectid; $link->linkedObjectId = $this->getRequestVar('targetobjectid'); + $link->projectid = $this->folder->projectid; $link->add(); @@ -224,6 +362,7 @@ class FolderAction extends ObjectAction $url->name = $name; $url->desc = $description; $url->parentid = $this->folder->objectid; + $url->projectid = $this->folder->projectid; $url->url = $this->getRequestVar('url'); @@ -259,6 +398,8 @@ class FolderAction extends ObjectAction $page->filename = $filename; $page->templateid = $this->getRequestVar('templateid'); $page->parentid = $this->folder->objectid; + $page->projectid = $this->folder->projectid; + $page->add(); @@ -933,6 +1074,36 @@ class FolderAction extends ObjectAction /** + * Hochladen einer Datei. + * + */ + public function createimageView() + { + // Maximale Dateigroesse. + $maxSizeBytes = $this->maxFileSize(); + $this->setTemplateVar('max_size' ,($maxSizeBytes/1024).' KB' ); + $this->setTemplateVar('maxlength',$maxSizeBytes ); + + $this->setTemplateVar('objectid',$this->folder->objectid ); + } + + + /** + * Hochladen einer Datei. + * + */ + public function createtextView() + { + // Maximale Dateigroesse. + $maxSizeBytes = $this->maxFileSize(); + $this->setTemplateVar('max_size' ,($maxSizeBytes/1024).' KB' ); + $this->setTemplateVar('maxlength',$maxSizeBytes ); + + $this->setTemplateVar('objectid',$this->folder->objectid ); + } + + + /** * Umwandlung von abgek�rzten Bytewerten ("Shorthand Notation") wie * "4M" oder "500K" in eine ganzzahlige Byteanzahl.<br> * <br> @@ -1018,9 +1189,9 @@ class FolderAction extends ObjectAction if ( $o->hasRight(ACL_READ) ) { - $list[$id]['name'] = Text::maxLaenge( 30,$o->name ); - $list[$id]['filename'] = Text::maxLaenge( 20,$o->filename ); - $list[$id]['desc'] = Text::maxLaenge( 30,$o->desc ); + $list[$id]['name'] = \Text::maxLaenge( 30,$o->name ); + $list[$id]['filename'] = \Text::maxLaenge( 20,$o->filename ); + $list[$id]['desc'] = \Text::maxLaenge( 30,$o->desc ); if ( $list[$id]['desc'] == '' ) $list[$id]['desc'] = lang('NO_DESCRIPTION_AVAILABLE'); $list[$id]['desc'] = $list[$id]['desc'].' - '.lang('IMAGE').' '.$id; @@ -1079,9 +1250,9 @@ class FolderAction extends ObjectAction if ( $o->hasRight(ACL_READ) ) { - $list[$id]['name'] = Text::maxLaenge( 30,$o->name ); - $list[$id]['filename'] = Text::maxLaenge( 20,$o->filename ); - $list[$id]['desc'] = Text::maxLaenge( 30,$o->desc ); + $list[$id]['name'] = \Text::maxLaenge( 30,$o->name ); + $list[$id]['filename'] = \Text::maxLaenge( 20,$o->filename ); + $list[$id]['desc'] = \Text::maxLaenge( 30,$o->desc ); if ( $list[$id]['desc'] == '' ) $list[$id]['desc'] = lang('NO_DESCRIPTION_AVAILABLE'); $list[$id]['desc'] = $list[$id]['desc'].' - '.lang('IMAGE').' '.$id; @@ -1246,9 +1417,9 @@ class FolderAction extends ObjectAction if ( $o->hasRight(ACL_READ) ) { $list[$id]['id' ] = $id; - $list[$id]['name'] = Text::maxLength( $o->name ,30); - $list[$id]['filename'] = Text::maxLength( $o->filename ,20); - $list[$id]['desc'] = Text::maxLength( $o->desc ,30); + $list[$id]['name'] = \Text::maxLength( $o->name ,30); + $list[$id]['filename'] = \Text::maxLength( $o->filename ,20); + $list[$id]['desc'] = \Text::maxLength( $o->desc ,30); if ( $list[$id]['desc'] == '' ) $list[$id]['desc'] = lang('NO_DESCRIPTION_AVAILABLE'); $list[$id]['desc'] = 'ID '.$id.' - '.$list[$id]['desc']; diff --git a/modules/cms-core/functions/common.inc.php b/modules/cms-core/functions/common.inc.php @@ -155,6 +155,17 @@ function db_connection() return Session::getDatabase(); } +/** + * Liefert die Datenbankverbindung fuer die aktuelle Sitzung. + * + * @return \database\Database + */ +function db() +{ + + return Session::getDatabase(); +} + diff --git a/modules/cms-core/model/BaseObject.class.php b/modules/cms-core/model/BaseObject.class.php @@ -874,14 +874,22 @@ SQL */ function objectAdd() { - $db = db_connection(); + self::add(); + } + /** + * Objekt hinzufuegen. + * + * Standardrechte und vom Elternobjekt vererbbare Berechtigungen werden gesetzt. + */ + function add() + { // Neue Objekt-Id bestimmen - $sql = $db->sql('SELECT MAX(id) FROM {{object}}'); + $sql = db()->sql('SELECT MAX(id) FROM {{object}}'); $this->objectid = intval($sql->getOne())+1; $this->checkFilename(); - $sql = $db->sql('INSERT INTO {{object}}'. + $sql = db()->sql('INSERT INTO {{object}}'. ' (id,parentid,projectid,filename,orderid,create_date,create_userid,lastchange_date,lastchange_userid,typeid,settings)'. ' VALUES( {objectid},{parentid},{projectid},{filename},{orderid},{time},{createuserid},{createtime},{userid},{typeid},\'\' )'); @@ -904,9 +912,6 @@ SQL $sql->query(); - if ( !empty($this->name) ) - $this->objectSaveName(); - // Standard-Rechte fuer dieses neue Objekt setzen. // Der angemeldete Benutzer erhaelt alle Rechte auf // das neue Objekt. Legitim, denn er hat es ja angelegt. diff --git a/modules/cms-core/model/File.class.php b/modules/cms-core/model/File.class.php @@ -424,14 +424,12 @@ EOF */ function add() { - $db = db_connection(); - - $this->objectAdd(); + parent::add(); - $sql = $db->sql('SELECT MAX(id) FROM {{file}}'); + $sql = db()->sql('SELECT MAX(id) FROM {{file}}'); $this->fileid = intval($sql->getOne())+1; - $sql = $db->sql('INSERT INTO {{file}}'. + $sql = db()->sql('INSERT INTO {{file}}'. ' (id,objectid,extension,size,value)'. " VALUES( {fileid},{objectid},{extension},0,'' )" ); $sql->setInt ('fileid' ,$this->fileid ); diff --git a/modules/cms-core/model/Folder.class.php b/modules/cms-core/model/Folder.class.php @@ -47,9 +47,9 @@ class Folder extends BaseObject } - function add() + public function add() { - $this->objectAdd(); + parent::add(); $db = db_connection(); diff --git a/modules/cms-core/model/Link.class.php b/modules/cms-core/model/Link.class.php @@ -104,14 +104,12 @@ class Link extends BaseObject */ public function add() { - $this->objectAdd(); + parent::add(); - $db = db_connection(); - - $stmt = $db->sql('SELECT MAX(id) FROM {{link}}'); + $stmt = db()->sql('SELECT MAX(id) FROM {{link}}'); $this->linkid = intval($stmt->getOne())+1; - $stmt = $db->sql('INSERT INTO {{link}}'. + $stmt = db()->sql('INSERT INTO {{link}}'. ' (id,objectid,link_objectid)'. ' VALUES( {linkid},{objectid},{linkobjectid} )' ); $stmt->setInt ('linkid' ,$this->linkid ); diff --git a/modules/cms-core/model/Page.class.php b/modules/cms-core/model/Page.class.php @@ -217,16 +217,17 @@ class Page extends BaseObject */ function add() { - $db = db_connection(); - - $this->objectAdd(); // Hinzuf?gen von Objekt (dabei wird Objekt-ID ermittelt) + parent::add(); // Hinzuf?gen von Objekt (dabei wird Objekt-ID ermittelt) - $sql = $db->sql('SELECT MAX(id) FROM {{page}}'); + $sql = db()->sql('SELECT MAX(id) FROM {{page}}'); $this->pageid = intval($sql->getOne())+1; - $sql = $db->sql('INSERT INTO {{page}}'. - ' (id,objectid,templateid)'. - ' VALUES( {pageid},{objectid},{templateid} )' ); + $sql = db()->sql(<<<SQL + INSERT INTO {{page}} + (id,objectid,templateid) + VALUES( {pageid},{objectid},{templateid} ) +SQL + ); $sql->setInt ('pageid' ,$this->pageid ); $sql->setInt ('objectid' ,$this->objectid ); $sql->setInt ('templateid',$this->templateid ); diff --git a/modules/cms-core/model/Url.class.php b/modules/cms-core/model/Url.class.php @@ -91,14 +91,12 @@ class Url extends BaseObject function add() { - $this->objectAdd(); + parent::add(); - $db = db_connection(); - - $sql = $db->sql('SELECT MAX(id) FROM {{url}}'); + $sql = db()->sql('SELECT MAX(id) FROM {{url}}'); $this->urlid = intval($sql->getOne())+1; - $sql = $db->sql('INSERT INTO {{url}}'. + $sql = db()->sql('INSERT INTO {{url}}'. ' (id,objectid,url)'. ' VALUES( {urlid},{objectid},{url} )' ); $sql->setInt ('urlid' ,$this->urlid ); diff --git a/modules/cms-ui/themes/default/html/views/folder/createfile.php b/modules/cms-ui/themes/default/html/views/folder/createfile.php @@ -13,7 +13,7 @@ </label> </div> <div class="input"> - <input size="40" id="req15431736221794568957_file" type="file" maxlength="<?php echo $maxlength ?>" name="file" class="upload" multiple="multiple" /> + <input size="40" id="req1543349803731534526_file" type="file" maxlength="<?php echo $maxlength ?>" name="file" class="upload" multiple="multiple" /> </div> </div> @@ -39,7 +39,7 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="url<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$url) ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php $url ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="<?php if ('') echo ''.'_' ?>url<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$url) ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php $url ?>"/><?php } ?></div> </div> </div> @@ -51,7 +51,7 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -61,7 +61,7 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml('') ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml('') ?></textarea></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/folder/createfolder.php b/modules/cms-ui/themes/default/html/views/folder/createfolder.php @@ -11,7 +11,7 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> </div> </div> @@ -21,7 +21,7 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml('') ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml('') ?></textarea></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/folder/createlink.php b/modules/cms-ui/themes/default/html/views/folder/createlink.php @@ -1,13 +1,13 @@ - <form name="" target="_self" data-target="view" action="./" data-method="createlink" data-action="folder" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="folder" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="folder" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="createlink" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="createlink" data-action="folder" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form folder" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="folder" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="createlink" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <div class="line"> <div class="label"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('global_NAME')))); ?></span> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> </div> </div> @@ -23,9 +23,9 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml('') ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml('') ?></textarea></div> </div> </div> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/folder/createpage.php b/modules/cms-ui/themes/default/html/views/folder/createpage.php @@ -19,7 +19,7 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus,name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus,name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -29,7 +29,7 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml('') ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml('') ?></textarea></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/folder/createurl.php b/modules/cms-ui/themes/default/html/views/folder/createurl.php @@ -1,13 +1,13 @@ - <form name="" target="_self" data-target="view" action="./" data-method="createurl" data-action="folder" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="folder" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="folder" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="createurl" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="createurl" data-action="folder" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form folder" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="folder" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="createurl" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <div class="line"> <div class="label"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('URL')))); ?></span> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="url<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php '' ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="<?php if ('') echo ''.'_' ?>url<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php '' ?>"/><?php } ?></div> </div> </div> @@ -17,7 +17,7 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php '' ?>"/><?php } ?></div> </div> </div> @@ -33,9 +33,9 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml('') ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml('') ?></textarea></div> </div> </div> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/link/edit.php b/modules/cms-ui/themes/default/html/views/link/edit.php @@ -1,6 +1,6 @@ - <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="link" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="link" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="link" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="link" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form link" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="link" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><div> <div class="line"> <div class="label"> @@ -18,5 +18,5 @@ </div> </div> </div></fieldset> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/link/info.php b/modules/cms-ui/themes/default/html/views/link/info.php @@ -1,6 +1,6 @@ - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="link" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="link" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="link" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="link" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form link" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="link" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div> <div class="line"> <div class="label"> @@ -79,5 +79,5 @@ </div> </div> </div></fieldset> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/page/prop.php b/modules/cms-ui/themes/default/html/views/page/prop.php @@ -11,7 +11,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -23,7 +23,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="150" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_filename" name="<?php if ('') echo ''.'_' ?>filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="150" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> </div> </div> @@ -35,7 +35,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><textarea class="description" name="description"><?php echo Text::encodeHtml($description) ?></textarea></div> + <div class="inputholder"><textarea class="description" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml($description) ?></textarea></div> </div> </div> @@ -49,9 +49,9 @@ </label> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_from_date" name="valid_from_date<?php if ('') echo '_disabled' ?>" type="date" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$valid_from_date) ?>" /><?php if ('') { ?><input type="hidden" name="valid_from_date" value="<?php $valid_from_date ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_from_date" name="<?php if ('') echo ''.'_' ?>valid_from_date<?php if ('') echo '_disabled' ?>" type="date" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$valid_from_date) ?>" /><?php if ('') { ?><input type="hidden" name="valid_from_date" value="<?php $valid_from_date ?>"/><?php } ?></div> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_from_time" name="valid_from_time<?php if ('') echo '_disabled' ?>" type="time" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$valid_from_time) ?>" /><?php if ('') { ?><input type="hidden" name="valid_from_time" value="<?php $valid_from_time ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_from_time" name="<?php if ('') echo ''.'_' ?>valid_from_time<?php if ('') echo '_disabled' ?>" type="time" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$valid_from_time) ?>" /><?php if ('') { ?><input type="hidden" name="valid_from_time" value="<?php $valid_from_time ?>"/><?php } ?></div> </div> </div> @@ -63,9 +63,9 @@ </label> </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_until_date" name="valid_until_date<?php if ('') echo '_disabled' ?>" type="date" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$valid_until_date) ?>" /><?php if ('') { ?><input type="hidden" name="valid_until_date" value="<?php $valid_until_date ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_until_date" name="<?php if ('') echo ''.'_' ?>valid_until_date<?php if ('') echo '_disabled' ?>" type="date" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$valid_until_date) ?>" /><?php if ('') { ?><input type="hidden" name="valid_until_date" value="<?php $valid_until_date ?>"/><?php } ?></div> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_until_time" name="valid_until_time<?php if ('') echo '_disabled' ?>" type="time" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$valid_until_time) ?>" /><?php if ('') { ?><input type="hidden" name="valid_until_time" value="<?php $valid_until_time ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_valid_until_time" name="<?php if ('') echo ''.'_' ?>valid_until_time<?php if ('') echo '_disabled' ?>" type="time" maxlength="256" class="" value="<?php echo Text::encodeHtml(@$valid_until_time) ?>" /><?php if ('') { ?><input type="hidden" name="valid_until_time" value="<?php $valid_until_time ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/url/edit.php b/modules/cms-ui/themes/default/html/views/url/edit.php @@ -1,6 +1,6 @@ - <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="url" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form url" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="edit" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><div> <div class="line"> <div class="label"> @@ -8,10 +8,10 @@ </div> <div class="input"> - <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="url<?php if ('') echo '_disabled' ?>" type="text" maxlength="255" class="text" value="<?php echo Text::encodeHtml(@$url) ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php $url ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_url" name="<?php if ('') echo ''.'_' ?>url<?php if ('') echo '_disabled' ?>" type="text" maxlength="255" class="" value="<?php echo Text::encodeHtml(@$url) ?>" /><?php if ('') { ?><input type="hidden" name="url" value="<?php $url ?>"/><?php } ?></div> </div> </div> </div></fieldset> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/url/info.php b/modules/cms-ui/themes/default/html/views/url/info.php @@ -1,6 +1,6 @@ - <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="url" data-async="" data-autosave=""><input type="submit" class="invisible" /><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="info" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form url" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="info" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div> <div class="line"> <div class="label"> @@ -79,5 +79,5 @@ </div> </div> </div></fieldset> - <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/url/prop.php b/modules/cms-ui/themes/default/html/views/url/prop.php @@ -0,0 +1,31 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="prop" data-action="url" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="or-form url" data-async="" data-autosave=""><input type="hidden" name="<?php echo REQ_PARAM_EMBED ?>" value="1" /><input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /><input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="url" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="prop" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <fieldset class="toggle-open-close<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend class="on-click-open-close"><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('global_prop') ?></legend><div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_name" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_name')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_name" name="<?php if ('') echo ''.'_' ?>name<?php if ('') echo '_disabled' ?>" autofocus="autofocus" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + + </div> + </div> + <div class="line"> + <div class="label"> + <label for="<?php echo REQUEST_ID ?>_description" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_description')))); ?></span> + + </label> + </div> + <div class="input"> + <div class="inputholder"><textarea class="description" name="<?php if ('') echo ''.'_' ?>description<?php if ('') echo '_disabled' ?>"><?php echo Text::encodeHtml($description) ?></textarea></div> + + </div> + </div> + </div></fieldset> + <div class="or-form-actionbar"><input type="submit" class="or-form-btn or-form-btn--primary" value="OK" /></div></form> + + \ No newline at end of file