Initial configuration page formatted and now saving

This commit is contained in:
Andy Miller
2014-09-10 12:24:09 -06:00
parent 25c53fa365
commit 98db461b2b
9 changed files with 81 additions and 48 deletions

View File

@@ -40,7 +40,8 @@ b, strong {
.button-bar { .button-bar {
text-align: right; text-align: right;
float: right; } float: right;
z-index: 2; }
.secondary-accent { .secondary-accent {
background: #349886; background: #349886;
@@ -471,12 +472,14 @@ form .form-select-wrapper {
line-height: 0; line-height: 0;
color: #9ba2a6; color: #9ba2a6;
pointer-events: none; } pointer-events: none; }
form .x-small select, form .x-small input {
max-width: 5rem !important; }
form .small select, form .small input { form .small select, form .small input {
min-width: 10rem; } min-width: 10rem !important; }
form .medium select, form .medium input { form .medium select, form .medium input {
min-width: 20rem; } min-width: 20rem !important; }
form .large select, form .large input { form .large select, form .large input {
min-width: 30rem; } min-width: 30rem !important; }
form select { form select {
border: 1px solid #d4d4d4; border: 1px solid #d4d4d4;
background: white; background: white;
@@ -486,6 +489,10 @@ form select {
padding: 5px 30px 5px 10px; padding: 5px 30px 5px 10px;
cursor: pointer; cursor: pointer;
margin: 0; } margin: 0; }
form input[type=text] {
width: auto;
border: 1px solid #d4d4d4;
background: white; }
form .switch-toggle label { form .switch-toggle label {
cursor: pointer; } cursor: pointer; }
form .switch-toggle a, form .switch-toggle label { form .switch-toggle a, form .switch-toggle label {
@@ -745,6 +752,7 @@ tr {
color: #737c81; color: #737c81;
padding: 2rem 0; } padding: 2rem 0; }
#admin-main .admin-block h1 { #admin-main .admin-block h1 {
color: #314d5b;
padding: 0 3rem 0.5rem; padding: 0 3rem 0.5rem;
margin: 0 0 1rem; margin: 0 0 1rem;
border-bottom: 3px solid #e1e1e1; } border-bottom: 3px solid #e1e1e1; }

File diff suppressed because one or more lines are too long

View File

@@ -187,6 +187,7 @@ $update-height: 3rem;
padding: 2rem 0; padding: 2rem 0;
h1 { h1 {
color: $page-bg;
padding: 0 $padding-default 0.5rem; padding: 0 $padding-default 0.5rem;
margin: 0 0 1rem; margin: 0 0 1rem;
border-bottom: 3px solid darken($content-bg, 5%); border-bottom: 3px solid darken($content-bg, 5%);

View File

@@ -23,6 +23,7 @@ b, strong {
.button-bar { .button-bar {
text-align: right; text-align: right;
float: right; float: right;
z-index: 2;
} }
.secondary-accent { .secondary-accent {

View File

@@ -72,21 +72,27 @@ form {
} }
} }
.x-small {
select, input {
max-width: 5rem !important;
}
}
.small { .small {
select, input { select, input {
min-width: 10rem; min-width: 10rem !important;
} }
} }
.medium { .medium {
select, input { select, input {
min-width: 20rem; min-width: 20rem !important;
} }
} }
.large { .large {
select, input { select, input {
min-width: 30rem; min-width: 30rem !important;
} }
} }
@@ -101,6 +107,12 @@ form {
margin: 0; margin: 0;
} }
input[type=text] {
width: auto;
border: $form-border-width solid $form-border;
background: $white;
}
// input[type=text] { // input[type=text] {
// width: 65%; // width: 65%;

View File

@@ -1,6 +1,9 @@
{% extends 'partials/base.html.twig' %} {% extends 'partials/base.html.twig' %}
{% block titlebar %} {% block titlebar %}
<div class="button-bar">
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> Save</button>
</div>
<h1><i class="fa fa-fw fa-th"></i> Configuration</h1> <h1><i class="fa fa-fw fa-th"></i> Configuration</h1>
{% endblock %} {% endblock %}

View File

@@ -1,17 +1,18 @@
{% set value = (value is null ? field.default : value) %} {% set value = (value is null ? field.default : value) %}
<div class="form-field"> <div class="form-field grid pure-g">
<label class="inline select"> <div class="form-label block size-1-3 pure-u-1-3">
<span> <label>
{% if field.help %} {% if field.help %}
<span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e }}">{{ field.label }}</span> <span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e }}">{{ field.label }}</span>
{% else %} {% else %}
{{ field.label }} {{ field.label }}
{% endif %} {% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }} {{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</span> </label>
</div>
<div class="form-data block size-2-3 pure-u-2-3">
<div class="form-select-wrapper {{ field.size }}">
<select name="{{ (scope ~ field.name)|fieldName }}" <select name="{{ (scope ~ field.name)|fieldName }}"
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %} {% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %} {% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
@@ -23,5 +24,6 @@
</option> </option>
{% endfor %} {% endfor %}
</select> </select>
</label> </div>
</div>
</div> </div>

View File

@@ -1,14 +1,18 @@
{% set value = (value is null ? field.default : value) %} {% set value = (value is null ? field.default : value) %}
<div class="form-field"> <div class="form-field grid pure-g">
<label class="inline"> <div class="form-label block size-1-3 pure-u-1-3">
<label>
{% if field.help %} {% if field.help %}
<span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e }}">{{ field.label }}</span> <span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e }}">{{ field.label }}</span>
{% else %} {% else %}
{{ field.label }} {{ field.label }}
{% endif %} {% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }} {{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</label>
</div>
<div class="form-data block size-2-3 pure-u-2-3">
<div class="form-input-wrapper {{ field.size }}">
<input type="text" <input type="text"
class="input" class="input"
name="{{ (scope ~ field.name)|fieldName }}" name="{{ (scope ~ field.name)|fieldName }}"
@@ -20,5 +24,6 @@
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %} {% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
{% if field.validate.pattern %}pattern="{{ field.validate.pattern }}"{% endif %} {% if field.validate.pattern %}pattern="{{ field.validate.pattern }}"{% endif %}
/> />
</label> </div>
</div>
</div> </div>

View File

@@ -14,9 +14,9 @@
{% set value = value|json_encode|e %} {% set value = value|json_encode|e %}
{% include 'forms/fields/hidden/hidden.html.twig' %} {% include 'forms/fields/hidden/hidden.html.twig' %}
{% endfor %} {% endfor %}
<p><strong>Note:</strong> This page contains extra fields which are not visible in this form!</p>
{% endif %} {% endif %}
{#
<div class="button-bar"> <div class="button-bar">
<button class="button" name="task" value="save">Save</button> <button class="button" name="task" value="save">Save</button>
{% if context.exists %} {% if context.exists %}
@@ -44,4 +44,5 @@
return false; return false;
}); });
</script> </script>
#}
</form> </form>