mirror of
https://github.com/xevidos/codiad.git
synced 2025-01-03 11:42:12 +01:00
Added styles to login form
This commit is contained in:
parent
7a1dfccaf9
commit
30523e3eb7
1 changed files with 23 additions and 9 deletions
32
login.php
32
login.php
|
@ -84,14 +84,22 @@ if( isset( $_SESSION['theme'] ) ) {
|
|||
right: 50%;
|
||||
top: 50%;
|
||||
transform: translate( 50%,-50% );
|
||||
width: 50%;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 850px) {
|
||||
|
||||
#container {
|
||||
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 650px) {
|
||||
|
||||
#container {
|
||||
|
||||
width: 80%;
|
||||
width: 75%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -127,9 +135,7 @@ if( isset( $_SESSION['theme'] ) ) {
|
|||
|
||||
init: function() {
|
||||
|
||||
let _ = this;
|
||||
|
||||
this.d = {
|
||||
let d = {
|
||||
|
||||
username: {
|
||||
|
||||
|
@ -149,23 +155,31 @@ if( isset( $_SESSION['theme'] ) ) {
|
|||
},
|
||||
};
|
||||
this.form = new codiad.forms({
|
||||
data: _.d,
|
||||
data: d,
|
||||
container: $( "#container" ),
|
||||
submit_label: "Login",
|
||||
});
|
||||
this.form.submit
|
||||
this.form.submit = this.submit;
|
||||
},
|
||||
|
||||
submit: function() {
|
||||
submit: async function() {
|
||||
|
||||
let _this = this;
|
||||
|
||||
let submit = _this.v.controls.find( `[type="submit"]` );
|
||||
|
||||
if( _this.saving ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
_this.saving = true;
|
||||
submit.attr( "disabled", true );
|
||||
submit.text( "Submitting ..." );
|
||||
|
||||
let data = await _this.m.get_values();
|
||||
//let response = await codiad.common.ajax( "./index.php", "POST", data );
|
||||
|
||||
console.log( data );
|
||||
|
||||
submit.attr( "disabled", true );
|
||||
submit.text( "Logging In ..." );
|
||||
|
|
Loading…
Reference in a new issue