mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
fix #644 Status off by default
This commit is contained in:
@@ -167,8 +167,9 @@ class Upload implements ControllerProviderInterface
|
||||
|
||||
$postStatus = $request->get('status');
|
||||
|
||||
if (is_array($postStatus)) {
|
||||
|
||||
if (isset($postStatus[$collection->get_sbas_id()]) && is_array($postStatus[$collection->get_sbas_id()])) {
|
||||
$postStatus = $postStatus[$collection->get_sbas_id()];
|
||||
|
||||
$status = '';
|
||||
foreach (range(0, 64) as $i) {
|
||||
$status .= isset($postStatus[$i]) ? ($postStatus[$i] ? '1' : '0') : '0';
|
||||
|
@@ -67,10 +67,10 @@
|
||||
<img src="{{ status['img_off'] }}" width="16" height="16" />
|
||||
{% endif %}
|
||||
<span>{{ status['labeloff']|default('off') }}</span>
|
||||
<input type="radio" name="status[{{ bit }}]" value="off" checked="checked"/>
|
||||
<input type="radio" name="status[{{ collection.get_base_id() }}][{{ bit }}]" value="off" checked="checked"/>
|
||||
</td>
|
||||
<td class="status-tab-right">
|
||||
<input type="radio" name="status[{{ bit }}]" value="on" />
|
||||
<input type="radio" name="status[{{ collection.get_base_id() }}][{{ bit }}]" value="on" />
|
||||
<span for="labelon">{{ status['labelon']|default('on') }}</span>
|
||||
{% if status['img_on'] is not empty %}
|
||||
<img src="{{ status['img_on'] }}" width="16" height="16" />
|
||||
|
Reference in New Issue
Block a user