openrat-cms

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

commit 442e7bb49fc64e4ea414b0ec066de7042bfa35fa
parent a889e595ebff881fdca386afa30a975ef499ba02
Author: Jan Dankert <devnull@localhost>
Date:   Mon, 10 Sep 2018 23:36:54 +0200

Löschen von diversen Typen wieder ermöglicht, Eine Checkbox kann jetzt 'required' sein.

Diffstat:
modules/cms-ui/themes/default/html/views/element/remove.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/folder/edit.php | 12++++++------
modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/folder/remove.tpl.src.xml | 35++++++++++++++++++++++++++++++++---
modules/cms-ui/themes/default/html/views/group/remove.php | 40++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/group/remove.tpl.src.xml | 25++++++++++++++++++++++---
modules/cms-ui/themes/default/html/views/language/remove.php | 46++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/html/views/language/remove.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/model/remove.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/project/remove.php | 4++--
modules/cms-ui/themes/default/html/views/project/remove.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/title/show.php | 2+-
modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml | 2+-
modules/cms-ui/themes/default/html/views/user/remove.php | 10+++++-----
modules/cms-ui/themes/default/html/views/user/remove.tpl.src.xml | 27++++++++++++++++++++++++---
modules/template-engine/components/html/checkbox/Checkbox.class.php | 4+++-
modules/template-engine/components/template.xsd | 1+
17 files changed, 188 insertions(+), 30 deletions(-)

diff --git a/modules/cms-ui/themes/default/html/views/element/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/element/remove.tpl.src.xml @@ -18,7 +18,7 @@ <part class="label"> </part> <part class="input"> - <checkbox name="confirm"></checkbox> + <checkbox name="confirm" required="true"></checkbox> <label for="confirm"> <text text="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/folder/edit.php b/modules/cms-ui/themes/default/html/views/folder/edit.php @@ -6,13 +6,13 @@ <table width="100%"> <tr class="headline"> <td class="help"> - <?php { $tmpname = 'checkall';$default = '';$readonly = ''; + <?php { $tmpname = 'checkall';$default = '';$readonly = '';$required = ''; 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { @@ -34,13 +34,13 @@ <tr class="data"> <td width="1%"> <?php $if7=($writable); if($if7){?> - <?php { $tmpname = $id;$default = '';$readonly = ''; + <?php { $tmpname = $id;$default = '';$readonly = '';$required = ''; 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { @@ -164,13 +164,13 @@ <div class="input"> <span class="text"><?php echo nl2br('&nbsp;&nbsp;&nbsp;&nbsp;'); ?></span> - <?php { $tmpname = 'confirm';$default = '';$readonly = ''; + <?php { $tmpname = 'confirm';$default = '';$readonly = '';$required = '1'; 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { diff --git a/modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml b/modules/cms-ui/themes/default/html/views/folder/edit.tpl.src.xml @@ -111,7 +111,7 @@ </part> <part class="input"> <text raw="____" /> - <checkbox name="confirm" /> + <checkbox name="confirm" required="true" /> <label for="confirm"> <text key="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/folder/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/folder/remove.tpl.src.xml @@ -1,3 +1,32 @@ <output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"><dummy><form><window icon="group" name="GLOBAL_GROUPS"><row><column><text text="GLOBAL_NAME"></text></column><column><text var="name"></text></column></row><row><column><text text="GLOBAL_DELETE"></text></column><column><checkbox name="delete"></checkbox></column></row><row><column colspan="2" class="help"><text text="GROUP_DELETE_DESC"></text></column></row><row><column colspan="2"><button type="ok"></button></column></row></window></form><focus field="delete"></focus></dummy></output>- \ No newline at end of file + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> + <form> + <row> + <column> + <text text="GLOBAL_NAME"></text> + </column> + <column> + <text var="name"></text> + </column> + </row> + <row> + <column> + <text text="GLOBAL_DELETE"></text> + </column> + <column> + <checkbox name="delete" required="true"></checkbox> + </column> + </row> + <row> + <column colspan="2" class="help"> + <text text="GROUP_DELETE_DESC"></text> + </column> + </row> + <row> + <column colspan="2"> + <button type="ok"></button> + </column> + </row> + </form> +</output>+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/group/remove.php b/modules/cms-ui/themes/default/html/views/group/remove.php @@ -0,0 +1,39 @@ + + + <form name="" target="_self" data-target="view" action="./" data-method="remove" data-action="group" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="group" 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="group" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="remove" /><input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo OR_ID ?>" /> + <div class="line"> + <div class="label"> + <label class="label"><?php echo lang('GLOBAL_NAME') ?> + </label> + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </div> + </div> + <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('options') ?></legend><div> + </div></fieldset> + <div class="line"> + <div class="label"> + </div> + <div class="input"> + <?php { $tmpname = 'confirm';$default = '';$readonly = '';$required = '1'; + 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( $required ) echo ' required="required"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_confirm" class="label"><?php echo lang('GROUP_DELETE') ?> + </label> + </div> + </div> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/group/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/group/remove.tpl.src.xml @@ -1,3 +1,22 @@ <output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"><header back="true"><form><part class="line"><part class="label"><label key="GLOBAL_NAME"></label></part><part class="input"><text var="name"></text></part></part><group title="message:options"></group><part class="line"><part class="label"></part><part class="input"><checkbox name="confirm"></checkbox><label for="confirm" key="GROUP_DELETE"></label></part></part></form></header></output>- \ No newline at end of file + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> + <form> + <part class="line"> + <part class="label"> + <label key="GLOBAL_NAME"></label> + </part> + <part class="input"> + <text var="name"></text> + </part> + </part> + <group title="message:options"></group> + <part class="line"> + <part class="label"></part> + <part class="input"> + <checkbox name="confirm" required="true"></checkbox> + <label for="confirm" key="GROUP_DELETE"></label> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/language/remove.php b/modules/cms-ui/themes/default/html/views/language/remove.php @@ -0,0 +1,45 @@ + + + + + <form name="" target="_self" data-target="view" action="./" data-method="remove" data-action="language" data-id="<?php echo OR_ID ?>" method="post" enctype="application/x-www-form-urlencoded" class="language" 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="language" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="remove" /><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"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('GLOBAL_NAME')))); ?></span> + + </div> + <div class="input"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities($name))); ?></span> + + </div> + </div> + </div></fieldset> + <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('options') ?></legend><div> + <div class="line"> + <div class="label"> + </div> + <div class="input"> + <?php { $tmpname = 'confirm';$default = '';$readonly = '';$required = '1'; + 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( $required ) echo ' required="required"' ?> /><?php + + if ( $readonly && $checked ) + { + ?><input type="hidden" name="<?php echo $tmpname ?>" value="1" /><?php + } + } ?> + + <label for="<?php echo REQUEST_ID ?>_confirm" class="label"> + <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang('CONFIRM_DELETE')))); ?></span> + + </label> + </div> + </div> + </div></fieldset> + <div class="bottom"><div class="command "><input type="submit" class="submit ok" value="OK" /></div></div></form> + + \ No newline at end of file diff --git a/modules/cms-ui/themes/default/html/views/language/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/language/remove.tpl.src.xml @@ -19,7 +19,7 @@ <part class="label"> </part> <part class="input"> - <checkbox name="confirm"></checkbox> + <checkbox name="confirm" required="true"></checkbox> <label for="confirm"> <text text="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/model/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/model/remove.tpl.src.xml @@ -17,7 +17,7 @@ <part class="label"> </part> <part class="input"> - <checkbox name="confirm"></checkbox> + <checkbox name="confirm" required="true"></checkbox> <label for="confirm"> <text text="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/project/remove.php b/modules/cms-ui/themes/default/html/views/project/remove.php @@ -17,13 +17,13 @@ </div> <div class="input"> <div> - <?php { $tmpname = 'delete';$default = '';$readonly = ''; + <?php { $tmpname = 'delete';$default = '';$readonly = '';$required = '1'; 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { diff --git a/modules/cms-ui/themes/default/html/views/project/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/project/remove.tpl.src.xml @@ -17,7 +17,7 @@ <part class="input"> <part> - <checkbox name="delete"></checkbox> + <checkbox name="delete" required="true"></checkbox> <label for="delete"> <text text="CONFIRM_DELETE"></text> </label> diff --git a/modules/cms-ui/themes/default/html/views/title/show.php b/modules/cms-ui/themes/default/html/views/title/show.php @@ -233,7 +233,7 @@ </div> <div class="divide"> </div> - <div class="entry clickable filtered on-action-project on-action-template on-action-page on-action-element on-action-image on-action-file on-action-folder on-action-link on-action-language on-action-model"> + <div class="entry clickable filtered on-action-project on-action-template on-action-page on-action-element on-action-image on-action-file on-action-folder on-action-link on-action-language on-action-model on-action-user on-action-group"> <a title="<?php echo lang('menu_delete_desc') ?>" target="_self" data-type="dialog" data-action="" data-method="remove" data-id="<?php echo OR_ID ?>" data-extra="{'dialogAction':null,'dialogMethod':'remove'}" href="<?php echo Html::url('','remove','',array('dialogAction'=>'','dialogMethod'=>'remove')) ?>"> <img class="image-icon image-icon--method" title="" src="./modules/cms-ui/themes/default/images/icon/method/delete.svg" /> diff --git a/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml @@ -202,7 +202,7 @@ <part class="divide"/> - <part class="entry clickable filtered on-action-project on-action-template on-action-page on-action-element on-action-image on-action-file on-action-folder on-action-link on-action-language on-action-model"> + <part class="entry clickable filtered on-action-project on-action-template on-action-page on-action-element on-action-image on-action-file on-action-folder on-action-link on-action-language on-action-model on-action-user on-action-group"> <link type="dialog" title="message:menu_delete_desc" subaction="remove"> <image method="delete" align="left"></image> diff --git a/modules/cms-ui/themes/default/html/views/user/remove.php b/modules/cms-ui/themes/default/html/views/user/remove.php @@ -2,8 +2,8 @@ - <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="1" 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 ?>" /> - <fieldset class="<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('NAME') ?></legend><div> + <form name="" target="_self" data-target="view" action="./" data-method="remove" data-action="user" data-id="<?php echo OR_ID ?>" method="POST" enctype="application/x-www-form-urlencoded" class="user" 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="user" /><input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="remove" /><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('NAME') ?></legend><div> <div class="line"> <div class="label"> <label class="label"><?php echo lang('user_username') ?> @@ -14,19 +14,19 @@ </div> </div> - <fieldset class="<?php echo '1'?" open":" closed" ?><?php echo '1'?" show":"" ?>"><legend><div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div><?php echo lang('options') ?></legend><div> + <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('options') ?></legend><div> </div></fieldset> <div class="line"> <div class="label"> </div> <div class="input"> - <?php { $tmpname = 'confirm';$default = '';$readonly = ''; + <?php { $tmpname = 'confirm';$default = '';$readonly = '';$required = ''; 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { diff --git a/modules/cms-ui/themes/default/html/views/user/remove.tpl.src.xml b/modules/cms-ui/themes/default/html/views/user/remove.tpl.src.xml @@ -1,3 +1,24 @@ <output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"><header back="true"></header><form><group title="message:NAME"><part class="line"><part class="label"><label key="user_username"></label></part><part class="input"><text var="name" class="name"></text></part></part><group title="message:options"></group><part class="line"><part class="label"></part><part class="input"><checkbox name="confirm"></checkbox><label for="confirm" key="delete"></label></part></part></group></form></output>- \ No newline at end of file + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../../../../../../template-engine/components/template.xsd"> + <form> + <group title="message:NAME"> + <part class="line"> + <part class="label"> + <label key="user_username"></label> + </part> + <part class="input"> + <text var="name" class="name"></text> + </part> + </part> + <group title="message:options"></group> + <part class="line"> + <part class="label"></part> + <part class="input"> + <checkbox name="confirm" required="true"></checkbox> + <label for="confirm" key="delete"></label> + </part> + </part> + </group> + </form> +</output>+ \ No newline at end of file diff --git a/modules/template-engine/components/html/checkbox/Checkbox.class.php b/modules/template-engine/components/html/checkbox/Checkbox.class.php @@ -8,6 +8,7 @@ class CheckboxComponent extends Component public $default = false; public $name; public $readonly = false; + public $required = false; protected function begin(){ @@ -15,6 +16,7 @@ class CheckboxComponent extends Component echo '$tmpname = '.$this->value($this->name).';'; echo '$default = '.$this->value($this->default).';'; echo '$readonly = '.$this->value($this->readonly).';'; + echo '$required = '.$this->value($this->required).';'; echo <<<'HTML' @@ -23,7 +25,7 @@ class CheckboxComponent extends Component 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 + ?><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( $required ) echo ' required="required"' ?> /><?php if ( $readonly && $checked ) { diff --git a/modules/template-engine/components/template.xsd b/modules/template-engine/components/template.xsd @@ -654,6 +654,7 @@ <xsd:attribute name="default" type="xsd:boolean"/> <xsd:attribute name="name" type="xsd:string"/> <xsd:attribute name="readonly" type="xsd:boolean"/> + <xsd:attribute name="required" type="xsd:boolean"/> <xsd:attribute name="request" type="xsd:string"/> </xsd:complexType> <xsd:element name="input" type="inputType"/>