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 .contact form p
{ {
margin: 1em auto; margin: 0;
display: block; margin-bottom: 1em;
margin-top: 2em;
} }
.contact textarea .contact textarea
{ {
@ -21,7 +11,8 @@
.contact button .contact button
{ {
display: block; display: block;
margin: 0 auto; margin-right: auto;
margin-left: auto;
margin-top: 1em; margin-top: 1em;
padding: 0.6em; padding: 0.6em;
} }

View File

@ -3,6 +3,9 @@
<h1><t>IWantCustomer</t></h1> <h1><t>IWantCustomer</t></h1>
</div> </div>
<div id="form" class="contact"> <div id="form" class="contact">
<form
id="contact-form">
<input type="hidden" name="srv" value="json:misc/contact"/>
<div class="card form"> <div class="card form">
<p> <p>
<t>FillFormData</t> <t>FillFormData</t>
@ -10,45 +13,42 @@
<p> <p>
<t>OrCallUs</t> <t>OrCallUs</t>
</p> </p>
<form <div>
id="contact-form"> <label><t>Name</t></label>
<input type="hidden" name="srv" value="json:misc/contact"/> <input type="text" name="name"/>
<div class="form-group"> </div>
<label><t>Name</t></label> <div>
<input type="text" name="name"/> <label><t>City</t></label>
</div> <input type="text" name="city"/>
<div class="form-group"> </div>
<label><t>City</t></label> <div>
<input type="text" name="city"/> <label><t>PC</t></label>
</div> <input type="text" name="pc"/>
<div class="form-group"> </div>
<label><t>PC</t></label> <div>
<input type="text" name="pc"/> <label><t>Phone</t></label>
</div> <input type="text" name="phone"/>
<div class="form-group"> </div>
<label><t>Phone</t></label> <div>
<input type="text" name="phone"/> <label><t>EMail</t></label>
</div> <input type="text" name="email"/>
<div class="form-group"> </div>
<label><t>EMail</t></label> <div>
<input type="text" name="email"/> <label><t>Message</t></label>
</div> <textarea name="message"/>
<div class="form-group"> </div>
<label><t>Message</t></label> <div class="form-group captcha">
<textarea name="message"/> <label><t>Anti-Spam</t></label>
</div> <input type="text" name="captcha"/>
<div class="form-group captcha"> <img alt="Captcha" id="captcha-img"/>
<label><t>Anti-Spam</t></label> </div>
<input type="text" name="captcha"/> <p class="mandatory-message">
<img alt="Captcha" id="captcha-img"/> <t>AllFieldsMandatory</t>
</div> </p>
<p class="mandatory-message"> <button class="thin">
<t>AllFieldsMandatory</t> <t>Send</t>
</p> </button>
<button class="thin">
<t>Send</t>
</button>
</form>
</div> </div>
</form>
</div> </div>
</vn> </vn>

View File

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

View File

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

View File

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