Page 1 of 1

index.php

Posted: Sun Apr 15, 2018 5:57 pm
by Timo
If the Enter key is pressed on the login page (index.php), nothing happens. Most login forms would submit the form.
And Chrome shows a hint. It's nothing critical but shouldn't appear:
[DOM] Password field is not contained in a form: (More info: https://goo.gl/9p2vKq) <input id=​"nupassword" style=​"position:​ absolute;​ top:​ 200px;​ left:​ 100px;​ background-image:​ url("data:​image/​png;​base64,xxxxx")​;​" type=​"password" autocomplete=​"off">​

Re: index.php

Posted: Mon Apr 16, 2018 1:16 am
by admin
Timo,

Did you know you can create your own index page by adding a variable in nuconfig.php called $nuWelcomeBodyInnerHTML that contains your HTML...

Code: Select all

    $nuWelcomeBodyInnerHTML			= " 
	

				<div id='login' class='nuLogin' style='background-color:#d8e4ff; width:330;position:absolute;top:50px;height:300px;left:50px;border-style:solid;border-width:1px;border-color: rgba(0, 0, 0, 0.08);'>
					<div id='nulogo' style='background-size:100% 100%;background-image:url(\"graphics/logo.png\");position:absolute;width:200px;height:80px;top:45px;left:65px;'></div>
					<br>
						<div style='position:absolute;top:170px;left:20px;text-align:right;width:70px;display:inline-block;'>Username</div>
						<input id='nuusername' style='position:absolute;top:170px;left:100px;'/>
					<br>
					<br>
						<div style='position:absolute;top:200px;left:20px;text-align:right;width:70px;display:inline-block;'>Password</div>
						<input id='nupassword' style='position:absolute;top:200px;left:100px;' type='password'/>
					<br>
					<br>
						<input id='submit' type='submit' class='nuButton' style='position:absolute;width:90px;height:30px;top:240px;left:130px;' onclick='nuLoginRequest()' value='Log in'/>
					<br>
					<br>
				</div>

									";
If someone wants to make a better one I might "steal" theirs.


Steven

Re: index.php

Posted: Mon Apr 16, 2018 7:22 am
by Timo
I wrapped it in form tags. If you think it's useful, you're welcome to use it.

Code: Select all

    $nuWelcomeBodyInnerHTML			= " 
	<form id=\"nuLoginForm\" action=\"#\" method=\"post\" onsubmit=\"return false;\">
	<div id='login' class='nuLogin' style='background-color:#d8e4ff; width:330;position:absolute;top:50px;height:300px;left:50px;border-style:solid;border-width:1px;border-color: rgba(0, 0, 0, 0.08);'>
	   <div id='nulogo' style='background-size:100% 100%;background-image:url(\"graphics/logo.png\");position:absolute;width:200px;height:80px;top:45px;left:65px;'></div>
	   <br>
		  <div style='position:absolute;top:170px;left:20px;text-align:right;width:70px;display:inline-block;'>Username</div>
		  <input id='nuusername' style='position:absolute;top:170px;left:100px;'/>
	   <br>
	   <br>
		  <div style='position:absolute;top:200px;left:20px;text-align:right;width:70px;display:inline-block;'>Password</div>
		  <input id='nupassword' style='position:absolute;top:200px;left:100px;' type='password'/>
	   <br>
	   <br>
		  <input id='submit' type='submit' class='nuButton' style='position:absolute;width:90px;height:30px;top:240px;left:130px;' onclick='nuLoginRequest()' value='Log in'/>
	   <br>
	   <br>
	</div>
	</form>";

Re: index.php

Posted: Fri Apr 20, 2018 1:15 am
by admin
Timo,

I have "stolen" that now and it's in the latest Github changes as the default - not using $nuWelcomeBodyInnerHTML in nuconfig.php.

Steven

Re: index.php

Posted: Fri Feb 01, 2019 1:29 am
by xyz2019
admin wrote:Timo,

I have "stolen" that now and it's in the latest Github changes as the default - not using $nuWelcomeBodyInnerHTML in nuconfig.php.

Steven
Curious to know which file contains the default code of $nuWelcomeBodyInnerHTML?

Re: index.php

Posted: Fri Feb 01, 2019 4:31 am
by kev1n
Just modify the one in nuconfig.php.