Fix latest merge

This commit is contained in:
Nicolas Le Goff
2014-08-11 22:53:13 +02:00
parent 2899f152fb
commit 4fa1f613e4
35 changed files with 378 additions and 275 deletions

View File

@@ -1,109 +1,98 @@
<div id="admin_setup_registry">
<div class="page-header">
<h1>{{ 'Setup' | trans }}</h1>
<div class="page-header">
<h1>{{ 'Setup' | trans }}</h1>
</div>
<form class="form-horizontal" id="GV_form_head">
<div class="control-group">
<label class="control-label">Adresse : </label>
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['conf'].get('servername') }}" />
</div>
</div>
<form class="form-horizontal" id="GV_form_head">
<div class="control-group">
<label class="control-label">Adresse : </label>
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['conf'].get('servername') }}" />
</div>
<div class="control-group">
<label class="control-label">Installation : </label>
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['root.path'] }}" />
</div>
<div class="control-group">
<label class="control-label">Installation : </label>
<div class="controls">
<input type="text" class="input-xxlarge" readonly="readonly" value="{{ app['root.path'] }}" />
</div>
</div>
<div class="control-group">
<label class="control-label">Maintenance : </label>
<div class="controls">
<input type="checkbox" readonly="readonly" disabled="disabled"/>
</div>
<div class="control-group">
<label class="control-label">Maintenance : </label>
<div class="controls">
<input type="checkbox" readonly="readonly" disabled="disabled"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Debug : </label>
<div class="controls">
<input type="checkbox" readonly="readonly" disabled="disabled" {{ app['debug'] ? "checked='checked'" : '' }} />
</div>
<div class="control-group">
<label class="control-label">Debug : </label>
<div class="controls">
<input type="checkbox" readonly="readonly" disabled="disabled" {{ app['debug'] ? "checked='checked'" : '' }} />
</div>
</div>
</form>
<form id="GV_form" class="form-horizontal" method="post" action = "{{ path('setup_submit_globals') }}">
{% for section in GV %}
<fieldset>
<legend> {{ section['section'] }} </legend>
{% for value in section['vars'] %}
{% set readonly = false %}
{% if value['readonly'] is defined and value['readonly'] == true %}
{% set readonly = true %}
{% endif %}
</div>
</form>
{{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
{% for daform in form %}
<fieldset>
<legend>{{ daform.vars['label'] }}</legend>
{% for formdata in daform %}
{{ form_start(form, {'method': 'POST', 'action' : path('setup_display_globals'), 'attr': {'class' : 'form-horizontal'}}) }}
{% for daform in form %}
<fieldset>
<legend>{{ daform.vars['label'] }}</legend>
{% for formdata in daform %}
<div class="control-group">
{{ form_label(formdata, null, { 'label_attr': {'class' : 'control-label'} } ) }}
<div class="controls">
{{ form_widget(formdata, {'attr': {'class': 'input-xxlarge'}}) }}
</div>
<div class="help-message text-info">{{ formdata.vars['help_message'] | raw }}</div>
<div>{{ formdata.vars['help_message'] }}</div>
{{ form_rest(formdata) }}
</div>
{% endfor %}
{{ form_rest(daform) }}
</fieldset>
{% endfor %}
<div class="well well-large">
<div style="max-width: 400px;margin: 0 auto 10px;">
<input type="submit" class="btn btn-warning btn-block btn-large" value="{{ 'boutton::valider' | trans }}"/>
</div>
{% endfor %}
{{ form_rest(daform) }}
</fieldset>
{% endfor %}
<div class="well well-large">
<div style="max-width: 400px;margin: 0 auto 10px;">
<input type="submit" class="btn btn-warning btn-block btn-large" value="{{ 'boutton::valider' | trans }}"/>
</div>
{{ form_end(form) }}
</div>
{{ form_end(form) }}
<script type='text/javascript'>
{% autoescape false %}
$(document).ready(function() {
// use html5 fallback validation if browser do not support required attribute
var form = $("#GV_form");
var inputs = form.find("input, select, textarea");
// if required not supported, emulate it
if (!Modernizr.input.required) {
form.bind("submit", function (event) {
var required = [];
// loop through input elements looking for required
$.each(inputs, function(k, input){
var input = $(input);
if (typeof input.attr('required') !== "undefined") {
// if the value is empty, add to required array
if (input.val().replace(/^\s+|\s+$/g, '') === '') {
required.push(input.attr('name'));
}
$(document).ready(function() {
// use html5 fallback validation if browser do not support required attribute
var form = $("#GV_form");
var inputs = form.find("input, select, textarea");
// if required not supported, emulate it
if (!Modernizr.input.required) {
form.bind("submit", function (event) {
var required = [];
// loop through input elements looking for required
$.each(inputs, function(k, input){
var input = $(input);
if (typeof input.attr('required') !== "undefined") {
// if the value is empty, add to required array
if (input.val().replace(/^\s+|\s+$/g, '') === '') {
required.push(input.attr('name'));
}
});
// show popover if required array contains any elements
if (required.length > 0) {
$.each(required, function(k, name) {
var $this = $("input[name="+name+"], select[name="+name+"], textarea[name="+name+"]");
$this.popover({ title: language.attention, content: language.requiredValue, placement:"bottom" })
.blur(function () {
$this.popover('hide');
});
$this.popover("show");
});
// prevent the form from being submitted
event.stopImmediatePropagation();
return false;
}
});
}
});
// show popover if required array contains any elements
if (required.length > 0) {
$.each(required, function(k, name) {
var $this = $("input[name="+name+"], select[name="+name+"], textarea[name="+name+"]");
$this.popover({ title: language.attention, content: language.requiredValue, placement:"bottom" })
.blur(function () {
$this.popover('hide');
});
$this.popover("show");
});
// prevent the form from being submitted
event.stopImmediatePropagation();
return false;
}
});
}
});
{% endautoescape %}
</script>
</script>

View File

@@ -35,6 +35,7 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if app['phraseanet.configuration']['main']['task-manager']['enabled'] %}
<li>
<a method="POST" href="{{ path('admin_tasks_scheduler_start') }}">
{{ 'Start' | trans }}
@@ -45,6 +46,7 @@
{{ 'Stop' | trans }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('admin_tasks_scheduler_log') }}">
{{ 'Logs' | trans }}
@@ -70,6 +72,7 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if app['phraseanet.configuration']['main']['task-manager']['enabled'] %}
<li>
<a href="{{ path('admin_tasks_task_show', {"task" : task["id"] }) }}">
{{ 'Edit' | trans }}
@@ -90,6 +93,7 @@
{{ 'Delete' | trans }}
</a>
</li>
{% endif %}
<li>
<a href="{{ path('admin_tasks_task_log', {"task" : task["id"] }) }}">
{{ 'Logs' | trans }}