pass strictformcheck to view, fix undefined variable error

This commit is contained in:
Uwe Steinmann 2016-02-01 19:56:13 +01:00
parent 6251c5de4a
commit 0ca91816b5
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,7 @@ if(isset($_GET['userid']) && $_GET['userid']) {
} }
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'seluser'=>$seluser, 'allusers'=>$users, 'allgroups'=>$groups, 'passwordstrength'=>$settings->_passwordStrength, 'passwordexpiration'=>$settings->_passwordExpiration, 'httproot'=>$settings->_httpRoot, 'enableuserimage'=>$settings->_enableUserImage, 'undeluserids'=>explode(',', $settings->_undelUserIds), 'workflowmode'=>$settings->_workflowMode, 'quota'=>$settings->_quota)); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'seluser'=>$seluser, 'allusers'=>$users, 'allgroups'=>$groups, 'passwordstrength'=>$settings->_passwordStrength, 'passwordexpiration'=>$settings->_passwordExpiration, 'httproot'=>$settings->_httpRoot, 'enableuserimage'=>$settings->_enableUserImage, 'undeluserids'=>explode(',', $settings->_undelUserIds), 'workflowmode'=>$settings->_workflowMode, 'quota'=>$settings->_quota, 'strictformcheck'=>$settings->_strictFormCheck));
if($view) { if($view) {
$view($_GET); $view($_GET);
} }

View File

@ -33,6 +33,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
function js() { /* {{{ */ function js() { /* {{{ */
$seluser = $this->params['seluser']; $seluser = $this->params['seluser'];
$strictformcheck = $this->params['strictformcheck'];
?> ?>
function checkForm() function checkForm()
{ {
@ -381,7 +382,7 @@ $(document).ready( function() {
foreach ($workflows as $workflow) { foreach ($workflows as $workflow) {
print "<option value=\"".$workflow->getID()."\""; print "<option value=\"".$workflow->getID()."\"";
$checked = false; $checked = false;
foreach($mandatoryworkflows as $mw) if($mw->getID() == $workflow->getID()) $checked = true; if($mandatoryworkflows) foreach($mandatoryworkflows as $mw) if($mw->getID() == $workflow->getID()) $checked = true;
if($checked) if($checked)
echo " selected=\"selected\""; echo " selected=\"selected\"";
print ">". htmlspecialchars($workflow->getName())."</option>"; print ">". htmlspecialchars($workflow->getName())."</option>";