diff --git a/module/install/js/license.ui.js b/module/install/js/license.ui.js new file mode 100644 index 0000000000..19597fb7e0 --- /dev/null +++ b/module/install/js/license.ui.js @@ -0,0 +1,21 @@ +/** + * When agree checkbox change. + * + * @param event $event + * @access public + * @return void + */ +function agreeChange(event) +{ + if($(event.target).prop('checked')) + { + $('.btn-install').attr('href', nextLink); + $('.btn-install').removeClass('disabled'); + } + else + { + $('.btn-install').removeAttr('href'); + $('.btn-install').addClass('disabled'); + } +} + diff --git a/module/install/ui/license.html.php b/module/install/ui/license.html.php index 609ef6d7fc..f0c557c221 100644 --- a/module/install/ui/license.html.php +++ b/module/install/ui/license.html.php @@ -11,6 +11,9 @@ declare(strict_types=1); namespace zin; set::zui(true); + +jsVar('nextLink', inlink('step1')); + div ( set::id('main'), @@ -32,7 +35,7 @@ div setClass('mt-2'), checkbox ( - on::change(''), + on::change('agreeChange'), set::checked(true), html($lang->agreement), ), @@ -42,7 +45,7 @@ div setClass('text-center'), btn ( - setClass('px-6'), + setClass('px-6 btn-install'), set::url(inlink('step1')), set::type('primary'), $lang->install->next,