0
1
Fork 0

Estilo beta

This commit is contained in:
Juan Ferrer Toribio 2017-01-18 12:50:07 +01:00
parent 2c6c51865f
commit 969f58981e
6 changed files with 119 additions and 74 deletions

View File

@ -1,18 +1,8 @@
.contact .form
{
position: relative;
text-align: left;
}
.contact form
{
margin: 0 auto;
}
.contact form p
{
margin: 1em auto;
display: block;
margin-top: 2em;
margin: 0;
margin-bottom: 1em;
}
.contact textarea
{
@ -21,7 +11,8 @@
.contact button
{
display: block;
margin: 0 auto;
margin-right: auto;
margin-left: auto;
margin-top: 1em;
padding: 0.6em;
}

View File

@ -3,6 +3,9 @@
<h1><t>IWantCustomer</t></h1>
</div>
<div id="form" class="contact">
<form
id="contact-form">
<input type="hidden" name="srv" value="json:misc/contact"/>
<div class="card form">
<p>
<t>FillFormData</t>
@ -10,30 +13,27 @@
<p>
<t>OrCallUs</t>
</p>
<form
id="contact-form">
<input type="hidden" name="srv" value="json:misc/contact"/>
<div class="form-group">
<div>
<label><t>Name</t></label>
<input type="text" name="name"/>
</div>
<div class="form-group">
<div>
<label><t>City</t></label>
<input type="text" name="city"/>
</div>
<div class="form-group">
<div>
<label><t>PC</t></label>
<input type="text" name="pc"/>
</div>
<div class="form-group">
<div>
<label><t>Phone</t></label>
<input type="text" name="phone"/>
</div>
<div class="form-group">
<div>
<label><t>EMail</t></label>
<input type="text" name="email"/>
</div>
<div class="form-group">
<div>
<label><t>Message</t></label>
<textarea name="message"/>
</div>
@ -48,7 +48,7 @@
<button class="thin">
<t>Send</t>
</button>
</div>
</form>
</div>
</div>
</vn>

View File

@ -1,9 +1,4 @@
.basket .card
{
max-width: 30em;
padding: 0 2em;
}
.basket .form > p
{
margin: 0;
@ -13,7 +8,7 @@
}
.basket .head
{
padding: 1.8em 0;
padding-bottom: 2em;
margin: 0;
border-bottom: 1px solid #DDD;
}

View File

@ -17,7 +17,7 @@
on-click="onConfigureClick"/>
</div>
<div id="form" class="basket">
<div class="card">
<div class="card form">
<div class="head">
<p>
<t>Total</t>

View File

@ -150,12 +150,16 @@ p
/* Focus outline */
a:focus,
input:focus,
button:focus
{
outline: 1px solid rgba(1, 1, 1, 0.15);
-moz-outline-radius: .1em;
}
input:focus
{
outline: none;
border-bottom: 1px solid black;
}
button::-moz-focus-inner,
input[type=submit]::-moz-focus-inner,
input[type=button]::-moz-focus-inner,
@ -181,7 +185,7 @@ select,
{
border: none;
border-bottom: 1px solid #999;
margin: .2em 0;
margin: 0;
box-sizing: border-box;
color: #333;
border-radius: 0;
@ -371,21 +375,14 @@ img.editable
/* Form */
.form
{
max-width: 30em;
}
.form-group,
.form > div
{
margin-bottom: 1.2em;
}
.form-group:last-child,
.form > :last-child
{
margin-bottom: 0;
}
.form-group > label,
.form > div > label
{
display: block;
@ -394,12 +391,6 @@ img.editable
font-size: .9em;
color: #666;
}
.form-group > input[type=text],
.form-group > input[type=password],
.form-group > input[type=file],
.form-group > input[type=number],
.form-group > select,
.form-group > textarea,
.form > div > input[type=text],
.form > div > input[type=password],
.form > div > input[type=file],
@ -413,6 +404,7 @@ img.editable
.card.form
{
padding: 2em;
max-width: 30em;
}
/* List */

67
rest/misc/access-version.php Executable file
View File

@ -0,0 +1,67 @@
<?php
use Vn\Lib;
use Vn\Lib\UserException;
/**
* Uploads a access module.
*/
class AccessVersion extends Vn\Web\JsonRequest
{
function run ($db)
{
if (empty ($_REQUEST['moduleName']))
throw new UserException (s('Module name not specified'));
$module = $_REQUEST['moduleName'];
// Checks for file errors.
if (empty ($_FILES['moduleFile']['name']))
throw new UserException (s('File not choosed'));
if ($_FILES['moduleFile']['error'] != 0)
{
switch ($_FILES['image']['error'])
{
case UPLOAD_ERR_INI_SIZE:
$message = 'ErrIniSize';
break;
case UPLOAD_ERR_FORM_SIZE:
$message = 'ErrFormSize';
break;
case UPLOAD_ERR_PARTIAL:
$message = 'ErrPartial';
break;
case UPLOAD_ERR_NO_FILE:
$message = 'ErrNoFile';
break;
case UPLOAD_ERR_NO_TMP_DIR:
$message = 'ErrNoTmpDir';
break;
case UPLOAD_ERR_CANT_WRITE:
$message = 'ErrCantWrite';
break;
case UPLOAD_ERR_EXTENSION:
$message = 'ErrExtension';
break;
default:
$message = 'ErrDefault';
break;
}
throw new Lib\Exception (s($message));
}
error_log ($module);
error_log ($_FILES['moduleFile']['tmp_name']);
error_log ("/tmp/$module.png");
// Saves the module.
rename ($_FILES['moduleFile']['tmp_name'], "/tmp/$module.png");
//unlink ($_FILES['moduleFile']['tmp_name']);
return TRUE;
}
}