openrat-cms

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

commit f41ac71f4b123de694cc095a8548d1489b774911
parent 192ba076b97ee72db431cab7de0c7a9ad3d4c8dc
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  7 Sep 2018 22:13:42 +0200

Validierung von Eingabefeldern: Maximale Länge, so wie die DB-Spalten definiert sind.

Diffstat:
modules/cms-ui/themes/default/html/views/element/edit.php | 6+++---
modules/cms-ui/themes/default/html/views/element/edit.tpl.src.xml | 4++--
modules/cms-ui/themes/default/html/views/file/edit.php | 2+-
modules/cms-ui/themes/default/html/views/file/info.php | 2+-
modules/cms-ui/themes/default/html/views/file/prop.php | 6+++---
modules/cms-ui/themes/default/html/views/file/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/folder/prop.php | 4++--
modules/cms-ui/themes/default/html/views/folder/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/group/edit.php | 2+-
modules/cms-ui/themes/default/html/views/group/edit.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/grouplist/show.php | 2+-
modules/cms-ui/themes/default/html/views/image/edit.php | 2+-
modules/cms-ui/themes/default/html/views/image/info.php | 2+-
modules/cms-ui/themes/default/html/views/image/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/language/advanced.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/login/login.php | 6+++---
modules/cms-ui/themes/default/html/views/login/login.tpl.src.xml | 8++------
modules/cms-ui/themes/default/html/views/login/password.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/model/edit.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/page/prop.php | 4++--
modules/cms-ui/themes/default/html/views/page/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/profile/edit.tpl.src.html | 1-
modules/cms-ui/themes/default/html/views/project/edit.php | 10+++++-----
modules/cms-ui/themes/default/html/views/project/edit.tpl.src.xml | 8++++----
modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/template/addel.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/template/edit.php | 2+-
modules/cms-ui/themes/default/html/views/template/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/templatelist/add.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/text/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/title/show.php | 2+-
modules/cms-ui/themes/default/html/views/url/edit.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/url/prop.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/user/edit.php | 12++++++------
modules/cms-ui/themes/default/html/views/user/edit.tpl.src.xml | 10+++++-----
modules/cms-ui/themes/default/html/views/userlist/add.tpl.src.xml | 2+-
modules/template-engine/components/html/input/Input.class.php | 20+++++++++++++++-----
modules/template-engine/components/html/inputarea/Inputarea.class.php | 6++++++
modules/template-engine/components/template.xsd | 3+++
39 files changed, 85 insertions(+), 71 deletions(-)

diff --git a/modules/cms-ui/themes/default/html/views/element/edit.php b/modules/cms-ui/themes/default/html/views/element/edit.php @@ -2,14 +2,14 @@ - <form name="" target="_self" data-target="view" 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_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="<?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 ?>" /> + <form name="" target="_self" data-target="view" action="./" data-method="edit" data-action="element" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="element" 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="element" /><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 ?>" /> <div class="line"> <div class="label"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('ELEMENT_NAME')))); ?></span> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="50" class="text" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -19,7 +19,7 @@ </div> <div class="input"> - <div class="inputholder"><textarea class="inputarea" name="description"><?php echo Text::encodeHtml($description) ?></textarea></div> + <div class="inputholder"><textarea class="inputarea" name="description" maxlength="255"><?php echo Text::encodeHtml($description) ?></textarea></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/element/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/element/edit.tpl.src.xml @@ -7,7 +7,7 @@ <text text="ELEMENT_NAME"></text> </part> <part class="input"> - <input name="name" class="focus"></input> + <input name="name" focus="true" required="true" maxlength="50" /> </part> </part> @@ -16,7 +16,7 @@ <text text="GLOBAL_DESCRIPTION"></text> </part> <part class="input"> - <inputarea name="description" rows="5"></inputarea> + <inputarea name="description" rows="5" maxlength="255"></inputarea> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/file/edit.php b/modules/cms-ui/themes/default/html/views/file/edit.php @@ -9,7 +9,7 @@ <div class="input"> <br/> - <input size="40" id="req15357454222035477865_file" type="file" name="file" class="upload" /> + <input size="40" id="req1536351057324003241_file" type="file" name="file" class="upload" /> <br/> diff --git a/modules/cms-ui/themes/default/html/views/file/info.php b/modules/cms-ui/themes/default/html/views/file/info.php @@ -140,7 +140,7 @@ </tr> <?php } ?> </table> - <?php $if6=(empty($pages)); if($if6){?> + <?php $if6=(($pages)==FALSE); if($if6){?> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> <?php } ?> diff --git a/modules/cms-ui/themes/default/html/views/file/prop.php b/modules/cms-ui/themes/default/html/views/file/prop.php @@ -11,7 +11,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> 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="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<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" 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="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"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_extension" name="extension<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="extension" value="<?php echo Text::encodeHtml(@$extension) ?>" /><?php if ('') { ?><input type="hidden" name="extension" value="<?php $extension ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_extension" name="extension<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="extension" value="<?php echo Text::encodeHtml(@$extension) ?>" /><?php if ('') { ?><input type="hidden" name="extension" value="<?php $extension ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/file/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/file/prop.tpl.src.xml @@ -19,7 +19,7 @@ </label> </part> <part class="input"> - <input name="filename" class="filename"></input> + <input name="filename" class="filename" maxlength="150"></input> </part> </part> <part class="line"> diff --git a/modules/cms-ui/themes/default/html/views/folder/prop.php b/modules/cms-ui/themes/default/html/views/folder/prop.php @@ -11,7 +11,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name,focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="256" class="name,focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -21,7 +21,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" 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> diff --git a/modules/cms-ui/themes/default/html/views/folder/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/folder/prop.tpl.src.xml @@ -17,7 +17,7 @@ <label for="filename" key="global_filename" /> </part> <part class="input"> - <input name="filename" class="filename" /> + <input name="filename" class="filename" maxlength="150" /> </part> </part> <part class="line"> diff --git a/modules/cms-ui/themes/default/html/views/group/edit.php b/modules/cms-ui/themes/default/html/views/group/edit.php @@ -11,7 +11,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="focus" 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="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="100" class="focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/group/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/group/edit.tpl.src.xml @@ -9,7 +9,7 @@ </label> </part> <part class="input"> - <input name="name" class="focus"></input> + <input name="name" class="focus" maxlength="100"></input> </part> </part> </form> diff --git a/modules/cms-ui/themes/default/html/views/grouplist/show.php b/modules/cms-ui/themes/default/html/views/grouplist/show.php @@ -21,7 +21,7 @@ <?php } ?> <tr class="data"> <td colspan="2" class="clickable"> - <a target="_self" date-name="<?php echo lang('menu_add') ?>" name="<?php echo lang('menu_add') ?>" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','add','',array()) ?>"> + <a target="_self" date-name="<?php echo lang('menu_add') ?>" name="<?php echo lang('menu_add') ?>" data-type="dialog" data-action="" data-method="add" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'add'}" href="<?php echo Html::url('','add','',array('dialogAction'=>'','dialogMethod'=>'add')) ?>"> <img class="" title="" src="./modules/cms-ui/themes/default/images/icon/add.png" /> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('new')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/image/edit.php b/modules/cms-ui/themes/default/html/views/image/edit.php @@ -9,7 +9,7 @@ <div class="input"> <br/> - <input size="40" id="req1535836286301209221_file" type="file" name="file" class="upload" /> + <input size="40" id="req15363506911722288978_file" type="file" name="file" class="upload" /> <br/> diff --git a/modules/cms-ui/themes/default/html/views/image/info.php b/modules/cms-ui/themes/default/html/views/image/info.php @@ -140,7 +140,7 @@ </tr> <?php } ?> </table> - <?php $if6=(empty($pages)); if($if6){?> + <?php $if6=(($pages)==FALSE); if($if6){?> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NOT_FOUND')))); ?></span> <?php } ?> diff --git a/modules/cms-ui/themes/default/html/views/image/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/image/prop.tpl.src.xml @@ -19,7 +19,7 @@ </label> </part> <part class="input"> - <input name="filename" class="filename"></input> + <input name="filename" class="filename" maxlength="150"></input> </part> </part> <part class="line"> diff --git a/modules/cms-ui/themes/default/html/views/language/advanced.tpl.src.xml b/modules/cms-ui/themes/default/html/views/language/advanced.tpl.src.xml @@ -8,7 +8,7 @@ <text text="GLOBAL_NAME"></text> </part> <part class="input"> - <input name="name" class="focus"></input> + <input name="name" class="focus" maxlength="50"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/login/login.php b/modules/cms-ui/themes/default/html/views/login/login.php @@ -44,11 +44,11 @@ </div> <div class="input"> <?php $if6=!(isset($$force_username)); if($if6){?> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> placeholder="<?php echo lang('USER_USERNAME') ?>" id="<?php echo REQUEST_ID ?>_login_name" name="login_name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name" value="<?php echo Text::encodeHtml(@$login_name) ?>" /><?php if ('') { ?><input type="hidden" name="login_name" value="<?php $login_name ?>"/><?php } ?></div> + <div class="inputholder"><input placeholder="<?php echo lang('USER_USERNAME') ?>" id="<?php echo REQUEST_ID ?>_login_name" name="login_name<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="128" class="name" value="<?php echo Text::encodeHtml(@$login_name) ?>" /><?php if ('') { ?><input type="hidden" name="login_name" value="<?php $login_name ?>"/><?php } ?></div> <?php } ?> <?php if(!$if6){?> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_login_name" name="login_name<?php if ('') echo '_disabled' ?>" type="hidden" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$login_name) ?>" /><?php if ('') { ?><input type="hidden" name="login_name" value="<?php $login_name ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_login_name" name="login_name<?php if ('') echo '_disabled' ?>" type="hidden" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$login_name) ?>" /><?php if ('') { ?><input type="hidden" name="login_name" value="<?php $login_name ?>"/><?php } ?></div> <span class="text"><?php echo nl2br(encodeHtml(htmlentities($force_username))); ?></span> @@ -127,7 +127,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_user_token" name="user_token<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="user_token" value="<?php '' ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_user_token" name="user_token<?php if ('') echo '_disabled' ?>" type="text" maxlength="30" class="text" value="<?php echo Text::encodeHtml('') ?>" /><?php if ('') { ?><input type="hidden" name="user_token" value="<?php '' ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/login/login.tpl.src.xml b/modules/cms-ui/themes/default/html/views/login/login.tpl.src.xml @@ -31,10 +31,6 @@ </if> <if false="config:login/nologin"> - <!-- - <part class="line"> <part class="label" /> <part class="input"> - <logo name="login"></logo> </part> </part> - --> <part class="line"> <part class="label"> @@ -45,7 +41,7 @@ <part class="input"> <if not="true" present="var:force_username"> <input type="text" name="login_name" class="name" value="" - hint="message:USER_USERNAME" size="20"></input> + hint="message:USER_USERNAME" size="20" maxlength="128" focus="true" required="true"></input> </if> <else> <input type="hidden" name="login_name" value="var:force_username"></input> @@ -117,7 +113,7 @@ </label> </part> <part class="input"> - <input name="user_token" default="" size="25" /> + <input name="user_token" default="" size="25" maxlength="30" /> </part> </part> </group> diff --git a/modules/cms-ui/themes/default/html/views/login/password.tpl.src.xml b/modules/cms-ui/themes/default/html/views/login/password.tpl.src.xml @@ -12,7 +12,7 @@ <text text="USER_USERNAME"></text> </part> <part class="input"> - <input type="text" name="username" value="" class="focus"></input> + <input type="text" name="username" value="" maxlength="128" focus="true"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/model/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/model/edit.tpl.src.xml @@ -7,7 +7,7 @@ <text text="GLOBAL_NAME"></text> </part> <part class="input"> - <input name="name"></input> + <input name="name" maxlength="50"></input> </part> </part> </form> 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<?php if ('') echo ' disabled="true"' ?> 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<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" required="required" 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> @@ -23,7 +23,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$filename) ?>" /><?php if ('') { ?><input type="hidden" name="filename" value="<?php $filename ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_filename" name="filename<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" 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> diff --git a/modules/cms-ui/themes/default/html/views/page/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/page/prop.tpl.src.xml @@ -19,7 +19,7 @@ </label> </part> <part class="input"> - <input name="filename" class="filename"></input> + <input name="filename" class="filename" maxlength="150"></input> </part> </part> <part class="line"> diff --git a/modules/cms-ui/themes/default/html/views/profile/edit.tpl.src.html b/modules/cms-ui/themes/default/html/views/profile/edit.tpl.src.html @@ -3,7 +3,6 @@ xmlns:or="http://www.openrat.de/template"> <or:form></or:form> <html:div></html:div> - </template> <!-- diff --git a/modules/cms-ui/themes/default/html/views/project/edit.php b/modules/cms-ui/themes/default/html/views/project/edit.php @@ -10,7 +10,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> 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<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="128" class="name" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -20,7 +20,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> 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<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_url" name="url<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" 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> </div> @@ -32,7 +32,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_target_dir" name="target_dir<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$target_dir) ?>" /><?php if ('') { ?><input type="hidden" name="target_dir" value="<?php $target_dir ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_target_dir" name="target_dir<?php if ('') echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="255" class="filename" value="<?php echo Text::encodeHtml(@$target_dir) ?>" /><?php if ('') { ?><input type="hidden" name="target_dir" value="<?php $target_dir ?>"/><?php } ?></div> </div> </div> @@ -42,7 +42,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if (!config('publish','project','override_system_command')) echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_cmd_after_publish" name="cmd_after_publish<?php if (!config('publish','project','override_system_command')) echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$cmd_after_publish) ?>" /><?php if (!config('publish','project','override_system_command')) { ?><input type="hidden" name="cmd_after_publish" value="<?php $cmd_after_publish ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if (!config('publish','project','override_system_command')) echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_cmd_after_publish" name="cmd_after_publish<?php if (!config('publish','project','override_system_command')) echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="255" class="filename" value="<?php echo Text::encodeHtml(@$cmd_after_publish) ?>" /><?php if (!config('publish','project','override_system_command')) { ?><input type="hidden" name="cmd_after_publish" value="<?php $cmd_after_publish ?>"/><?php } ?></div> </div> </div> @@ -98,7 +98,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if (!config('publish','ftp','enable')) echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_ftp_url" name="ftp_url<?php if (!config('publish','ftp','enable')) echo '_disabled' ?>" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$ftp_url) ?>" /><?php if (!config('publish','ftp','enable')) { ?><input type="hidden" name="ftp_url" value="<?php $ftp_url ?>"/><?php } ?></div> + <div class="inputholder"><input<?php if (!config('publish','ftp','enable')) echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_ftp_url" name="ftp_url<?php if (!config('publish','ftp','enable')) echo '_disabled' ?>" required="required" autofocus="autofocus" type="text" maxlength="256" class="filename" value="<?php echo Text::encodeHtml(@$ftp_url) ?>" /><?php if (!config('publish','ftp','enable')) { ?><input type="hidden" name="ftp_url" value="<?php $ftp_url ?>"/><?php } ?></div> <br/> diff --git a/modules/cms-ui/themes/default/html/views/project/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/project/edit.tpl.src.xml @@ -8,7 +8,7 @@ <label for="name" key="PROJECT_NAME"></label> </part> <part class="input"> - <input name="name" class="name"></input> + <input name="name" class="name" maxlength="128"></input> </part> </part> <part class="line"> @@ -16,7 +16,7 @@ <label for="url" key="PROJECT_HOSTNAME"></label> </part> <part class="input"> - <input name="url"></input> + <input name="url" maxlength="255"></input> </part> </part> </group> @@ -26,7 +26,7 @@ <label for="target_dir" key="PROJECT_TARGET_DIR"></label> </part> <part class="input"> - <input name="target_dir" class="filename"></input> + <input name="target_dir" class="filename" maxlength="255"></input> </part> </part> <part class="line"> @@ -35,7 +35,7 @@ </part> <part class="input"> <input name="cmd_after_publish" class="filename" - readonly="not:config:publish/project/override_system_command"></input> + readonly="not:config:publish/project/override_system_command" maxlength="255"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml b/modules/cms-ui/themes/default/html/views/projectlist/add.tpl.src.xml @@ -6,7 +6,7 @@ <text text="name"></text> </part> <part class="input"> - <input name="name" class="focus"></input> + <input name="name" class="focus" maxlength="128"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/template/addel.tpl.src.xml b/modules/cms-ui/themes/default/html/views/template/addel.tpl.src.xml @@ -8,7 +8,7 @@ <text text="global_name"></text> </part> <part class="input"> - <input name="name"></input> + <input name="name" maxlength="50" required="true" focus="true"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/template/edit.php b/modules/cms-ui/themes/default/html/views/template/edit.php @@ -27,7 +27,7 @@ </td> </tr> <?php } ?> - <?php $if3=(empty($el)); if($if3){?> + <?php $if3=(($el)==FALSE); if($if3){?> <tr> <td colspan="2"> <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'GLOBAL_NOT_FOUND'.'')))); ?></span> diff --git a/modules/cms-ui/themes/default/html/views/template/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/template/prop.tpl.src.xml @@ -7,7 +7,7 @@ <text text="TEMPLATE_NAME"></text> </part> <part class="input"> - <input name="name"></input> + <input name="name" maxlength="50"></input> </part> </part> <group></group> diff --git a/modules/cms-ui/themes/default/html/views/templatelist/add.tpl.src.xml b/modules/cms-ui/themes/default/html/views/templatelist/add.tpl.src.xml @@ -6,7 +6,7 @@ <text text="name"></text> </part> <part class="input"> - <input name="name"></input> + <input name="name" maxlength="50"></input> </part> </part> <group title="message:options"> diff --git a/modules/cms-ui/themes/default/html/views/text/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/text/prop.tpl.src.xml @@ -19,7 +19,7 @@ </label> </part> <part class="input"> - <input name="filename" class="filename"></input> + <input name="filename" class="filename" maxlength="150"></input> </part> </part> <part class="line"> diff --git a/modules/cms-ui/themes/default/html/views/title/show.php b/modules/cms-ui/themes/default/html/views/title/show.php @@ -381,7 +381,7 @@ <div class="toolbar-icon search"> <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/search.svg" /> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> placeholder="<?php echo lang('search') ?>" id="<?php echo REQUEST_ID ?>_text" name="text<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$text) ?>" /><?php if ('') { ?><input type="hidden" name="text" value="<?php $text ?>"/><?php } ?></div> + <div class="inputholder"><input placeholder="<?php echo lang('search') ?>" id="<?php echo REQUEST_ID ?>_text" name="text<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$text) ?>" /><?php if ('') { ?><input type="hidden" name="text" value="<?php $text ?>"/><?php } ?></div> <div class="arrow-down"> </div> diff --git a/modules/cms-ui/themes/default/html/views/url/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/url/edit.tpl.src.xml @@ -7,7 +7,7 @@ <text text="link_url"></text> </part> <part class="input"> - <input name="url"></input> + <input name="url" maxlength="255"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/url/prop.tpl.src.xml b/modules/cms-ui/themes/default/html/views/url/prop.tpl.src.xml @@ -9,7 +9,7 @@ </label> </part> <part class="input"> - <input name="name" class="name,focus"></input> + <input name="name" focus="true" class="name"></input> </part> </part> diff --git a/modules/cms-ui/themes/default/html/views/user/edit.php b/modules/cms-ui/themes/default/html/views/user/edit.php @@ -9,7 +9,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_name" name="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="name,focus" 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="name<?php if ('') echo '_disabled' ?>" type="text" maxlength="128" class="name,focus" value="<?php echo Text::encodeHtml(@$name) ?>" /><?php if ('') { ?><input type="hidden" name="name" value="<?php $name ?>"/><?php } ?></div> </div> </div> @@ -20,7 +20,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_fullname" name="fullname<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$fullname) ?>" /><?php if ('') { ?><input type="hidden" name="fullname" value="<?php $fullname ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_fullname" name="fullname<?php if ('') echo '_disabled' ?>" type="text" maxlength="128" class="text" value="<?php echo Text::encodeHtml(@$fullname) ?>" /><?php if ('') { ?><input type="hidden" name="fullname" value="<?php $fullname ?>"/><?php } ?></div> </div> </div> @@ -31,7 +31,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_mail" name="mail<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$mail) ?>" /><?php if ('') { ?><input type="hidden" name="mail" value="<?php $mail ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_mail" name="mail<?php if ('') echo '_disabled' ?>" type="text" maxlength="255" class="text" value="<?php echo Text::encodeHtml(@$mail) ?>" /><?php if ('') { ?><input type="hidden" name="mail" value="<?php $mail ?>"/><?php } ?></div> <div class="qrcode" data-qrcode="<?php echo 'mailto:'.$mail.'' ?>" title="<?php echo 'mailto:'.$mail.'' ?>"></div> @@ -44,7 +44,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_desc" name="desc<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$desc) ?>" /><?php if ('') { ?><input type="hidden" name="desc" value="<?php $desc ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_desc" name="desc<?php if ('') echo '_disabled' ?>" type="text" maxlength="255" class="text" value="<?php echo Text::encodeHtml(@$desc) ?>" /><?php if ('') { ?><input type="hidden" name="desc" value="<?php $desc ?>"/><?php } ?></div> </div> </div> @@ -54,7 +54,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_tel" name="tel<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$tel) ?>" /><?php if ('') { ?><input type="hidden" name="tel" value="<?php $tel ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_tel" name="tel<?php if ('') echo '_disabled' ?>" type="text" maxlength="128" class="text" value="<?php echo Text::encodeHtml(@$tel) ?>" /><?php if ('') { ?><input type="hidden" name="tel" value="<?php $tel ?>"/><?php } ?></div> <div class="qrcode" data-qrcode="<?php echo 'tel:'.$tel.'' ?>" title="<?php echo 'tel:'.$tel.'' ?>"></div> @@ -114,7 +114,7 @@ </label> </div> <div class="input"> - <div class="inputholder"><input<?php if ('') echo ' disabled="true"' ?> id="<?php echo REQUEST_ID ?>_ldap_dn" name="ldap_dn<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$ldap_dn) ?>" /><?php if ('') { ?><input type="hidden" name="ldap_dn" value="<?php $ldap_dn ?>"/><?php } ?></div> + <div class="inputholder"><input id="<?php echo REQUEST_ID ?>_ldap_dn" name="ldap_dn<?php if ('') echo '_disabled' ?>" type="text" maxlength="256" class="text" value="<?php echo Text::encodeHtml(@$ldap_dn) ?>" /><?php if ('') { ?><input type="hidden" name="ldap_dn" value="<?php $ldap_dn ?>"/><?php } ?></div> </div> </div> diff --git a/modules/cms-ui/themes/default/html/views/user/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/user/edit.tpl.src.xml @@ -7,7 +7,7 @@ <label for="name" key="user_username"></label> </part> <part class="input"> - <input name="name" size="20" class="name,focus"></input> + <input name="name" size="20" class="name,focus" maxlength="128"></input> </part> </part> <group title="message:ADDITIONAL_INFO"> @@ -16,7 +16,7 @@ <label for="fullname" key="user_fullname"></label> </part> <part class="input"> - <input name="fullname"></input> + <input name="fullname" maxlength="128"></input> </part> </part> <if true="config:security/user/show_admin_mail"> @@ -25,7 +25,7 @@ <label for="mail" key="user_mail"></label> </part> <part class="input"> - <input name="mail"></input> + <input name="mail" maxlength="255"></input> <qrcode value="tpl:mailto:{mail}" /> </part> </part> @@ -35,7 +35,7 @@ <label for="desc" key="user_desc"></label> </part> <part class="input"> - <input name="desc"></input> + <input name="desc" maxlength="255"></input> </part> </part> <part class="line"> @@ -43,7 +43,7 @@ <label for="tel" key="user_tel"></label> </part> <part class="input"> - <input name="tel"></input> + <input name="tel" maxlength="128"></input> <qrcode value="tpl:tel:{tel}" /> </part> diff --git a/modules/cms-ui/themes/default/html/views/userlist/add.tpl.src.xml b/modules/cms-ui/themes/default/html/views/userlist/add.tpl.src.xml @@ -6,7 +6,7 @@ <label for="name" key="user_username"></label> </part> <part class="input"> - <input name="name" class="focus"></input> + <input name="name" class="focus" maxlength="128"></input> </part> </part> </form> diff --git a/modules/template-engine/components/html/input/Input.class.php b/modules/template-engine/components/html/input/Input.class.php @@ -31,6 +31,10 @@ class InputComponent extends Component public $icon; + public $required = false; + + public $focus = false; + public function begin() { if(!$this->type == 'hidden') @@ -42,9 +46,9 @@ class InputComponent extends Component { echo '<div class="inputholder">'; echo '<input'; - if(isset($this->readonly)) + if($this->readonly) echo '<?php if ('.$this->value($this->readonly).') '."echo ' disabled=\"true\"' ?>"; - if (isset($this->hint)) + if (!empty($this->hint)) echo ' placeholder="'.$this->htmlvalue($this->hint).'"'; echo ' id="'.'<?php echo REQUEST_ID ?>_'.$this->htmlvalue($this->name).'"'; @@ -54,9 +58,15 @@ class InputComponent extends Component echo $this->htmlvalue($this->name); if(isset($this->readonly)) echo '<?php if ('.$this->value($this->readonly).') '."echo '_disabled' ?>"; - echo '"'; - - echo ' type="'.$this->htmlvalue($this->type).'"'; + echo '"'; + + if($this->required) + echo ' required="required"'; + if($this->focus) + echo ' autofocus="autofocus"'; + + + echo ' type="'.$this->htmlvalue($this->type).'"'; echo ' maxlength="'.$this->htmlvalue($this->maxlength).'"'; echo ' class="'.$this->htmlvalue($this->class).'"'; diff --git a/modules/template-engine/components/html/inputarea/Inputarea.class.php b/modules/template-engine/components/html/inputarea/Inputarea.class.php @@ -22,6 +22,8 @@ class InputareaComponent extends Component public $class = 'inputarea'; public $default; + + public $maxlength = 0; public function begin() { @@ -29,6 +31,10 @@ class InputareaComponent extends Component echo '<textarea'; echo ' class="'.$this->htmlvalue($this->class).'"'; echo ' name="'.$this->htmlvalue($this->name).'"'; + + if (!empty($this->maxlength)) + echo ' maxlength="'.intval($this->maxlength).'"'; + echo '>'; echo '<?php echo Text::encodeHtml('; if (isset($this->default)) diff --git a/modules/template-engine/components/template.xsd b/modules/template-engine/components/template.xsd @@ -712,6 +712,8 @@ <xsd:attribute name="readonly" type="xsd:boolean"/> <xsd:attribute name="hint" type="xsd:string"/> <xsd:attribute name="icon" type="xsd:string"/> + <xsd:attribute name="required" type="xsd:boolean"/> + <xsd:attribute name="focus" type="xsd:boolean"/> <xsd:attribute name="request" type="xsd:string"/> </xsd:complexType> <xsd:element name="insert" type="insertType"/> @@ -1103,6 +1105,7 @@ <xsd:attribute name="prefix" type="xsd:string"/> <xsd:attribute name="class" type="xsd:string"/> <xsd:attribute name="default" type="xsd:string"/> + <xsd:attribute name="maxlength" type="xsd:int"/> <xsd:attribute name="request" type="xsd:string"/> </xsd:complexType> <xsd:element name="window" type="windowType"/>