mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix latest merge
This commit is contained in:
@@ -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>
|
Reference in New Issue
Block a user