PMCORE-2623 Required fields are not been highlighted in the new user UI

This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-01-04 09:16:17 -04:00
parent 457ab8817b
commit 8b2d6cfd1e
7 changed files with 336 additions and 126 deletions

View File

@@ -11,6 +11,8 @@
<script type="text/javascript" src="/js/ext/translation.en.js"></script>
<script type="text/javascript">
var USR_UID='';
var canEdit=true;
var modeOfForm=1;
</script>
</head>
<body>

View File

@@ -28,6 +28,20 @@ new Vue({
},
baseUrl() {
return "../";
},
canEdit() {
let canEdit = true;
if ("canEdit" in window) {
canEdit = window.canEdit;
}
return canEdit;
},
modeOfForm() {
let modeOfForm = 1;
if ("modeOfForm" in window) {
modeOfForm = window.modeOfForm;
}
return modeOfForm;
}
}
}).$mount('#app');

View File

@@ -1,7 +1,8 @@
<?php
$headPublisher = headPublisher::getSingleton();
$headPublisher->addContent("users" . PATH_SEP . "userMain"); //Adding a html file .html
$headPublisher->addExtJsScript("users" . PATH_SEP . "userMain", true); //Adding a javascript file .js
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"]))? 1 : 0);
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"])) ? 1 : 0);
$headPublisher->assign("userInterface", (isset($_REQUEST["userInterface"]) ? $_REQUEST["userInterface"] : ""));
G::RenderPage("publish", "extJs");

View File

@@ -53,6 +53,19 @@ if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkd
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
if (isset($_REQUEST['userInterface']) && $_REQUEST['userInterface'] === "v2") {
$lang = defined("SYS_LANG") ? SYS_LANG : "en";
$html = file_get_contents(PATH_HTML . "lib/userPersonalInformation/index.html");
$html = str_replace("var USR_UID='';", "var USR_UID='{$aFields['USR_UID']}';", $html);
$html = str_replace("translation.en.js", "translation.{$lang}.js", $html);
$html = str_replace("csrfToken", csrfToken(), $html);
$html = str_replace("var canEdit=true;", ($canEdit === false ? "var canEdit=true;" : "var canEdit=false;"), $html);
$html = str_replace("var modeOfForm=1;", "var modeOfForm=2;", $html);
echo $html;
exit();
}
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true); //adding a javascript file .js
// $oHeadPublisher->addContent('users/users'); //adding a html file .html.

View File

@@ -22,7 +22,7 @@ userMain.application = {
id: "nodeInfo",
text: "Personal Information",
leaf: true,
url: "../users/usersInit"
url: "../users/usersInit?userInterface=" + userInterface
}
]

View File

@@ -12,7 +12,7 @@
}
</style>
<body onresize="autoResizeScreen()" onload="autoResizeScreen()">
<iframe name="frameMain" id="frameMain" src ="../users/userMain<?php echo ((isset($_GET["create_app"]))? "?create_app" : ""); ?>" width="100%" height="200" frameborder="0">
<iframe name="frameMain" id="frameMain" src ="../users/userMain<?php echo ((isset($_GET["create_app"]))? "?userInterface=v2&create_app" : "?userInterface=v2"); ?>" width="100%" height="200" frameborder="0">
<p>Your browser does not support iframes.</p>
</iframe>
</body>