Added more labels per download.
This commit is contained in:
parent
3990098e4b
commit
330fa62554
@ -47,7 +47,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
$tags = $this->upload->get_tags_list();
|
$tags = $this->upload->get_tags_list();
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
$initial = '';
|
$initial = '';
|
||||||
if (isset($tags[$i-1])) {
|
if (isset($tags[$i-1])) {
|
||||||
if ($tags[$i-1]->class != 'Other') {
|
if ($tags[$i-1]->class != 'Other') {
|
||||||
@ -82,7 +82,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$count = array();
|
$count = array();
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
|
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
|
||||||
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
||||||
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
||||||
@ -117,7 +117,7 @@ class IDF_Form_UpdateUpload extends Pluf_Form
|
|||||||
}
|
}
|
||||||
// Add a tag for each label
|
// Add a tag for each label
|
||||||
$tags = array();
|
$tags = array();
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
if (strlen($this->cleaned_data['label'.$i]) > 0) {
|
if (strlen($this->cleaned_data['label'.$i]) > 0) {
|
||||||
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
||||||
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
||||||
|
@ -52,7 +52,7 @@ class IDF_Form_Upload extends Pluf_Form
|
|||||||
'upload_path_create' => true),
|
'upload_path_create' => true),
|
||||||
|
|
||||||
));
|
));
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
$this->fields['label'.$i] = new Pluf_Form_Field_Varchar(
|
$this->fields['label'.$i] = new Pluf_Form_Field_Varchar(
|
||||||
array('required' => false,
|
array('required' => false,
|
||||||
'label' => __('Labels'),
|
'label' => __('Labels'),
|
||||||
@ -87,7 +87,7 @@ class IDF_Form_Upload extends Pluf_Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$count = array();
|
$count = array();
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
|
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
|
||||||
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
||||||
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
||||||
@ -122,7 +122,7 @@ class IDF_Form_Upload extends Pluf_Form
|
|||||||
}
|
}
|
||||||
// Add a tag for each label
|
// Add a tag for each label
|
||||||
$tags = array();
|
$tags = array();
|
||||||
for ($i=1;$i<4;$i++) {
|
for ($i=1;$i<7;$i++) {
|
||||||
if (strlen($this->cleaned_data['label'.$i]) > 0) {
|
if (strlen($this->cleaned_data['label'.$i]) > 0) {
|
||||||
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
|
||||||
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var auto_labels = [{/literal}{$auto_labels|safe}{literal}];
|
var auto_labels = [{/literal}{$auto_labels|safe}{literal}];
|
||||||
var j=0;
|
var j=0;
|
||||||
for (j=1;j<4;j=j+1) {
|
for (j=1;j<7;j=j+1) {
|
||||||
$("#id_label"+j).autocomplete(auto_labels, {
|
$("#id_label"+j).autocomplete(auto_labels, {
|
||||||
minChars: 0,
|
minChars: 0,
|
||||||
width: 310,
|
width: 310,
|
||||||
|
@ -29,7 +29,10 @@
|
|||||||
<td>
|
<td>
|
||||||
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
|
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
|
||||||
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
|
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
|
||||||
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}
|
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}<br />
|
||||||
|
{if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe}
|
||||||
|
{if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe}
|
||||||
|
{if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
<td>
|
<td>
|
||||||
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
|
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
|
||||||
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
|
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
|
||||||
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}
|
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}<br />
|
||||||
|
{if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe}
|
||||||
|
{if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe}
|
||||||
|
{if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user