Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 245b0322

Von Sven Schöling vor fast 17 Jahren hinzugefügt

  • ID 245b032241e70470b1d392b5fe055a2dfd6333c6
  • Vorgänger 99336679
  • Nachfolger ee82a6ce

Testanwendung der CGI::Ajax Modifikation:

Lieferadressen haben jetzt einen (noch nutzlosen) Loeschenbutton, der ausgeblendet wird, wenn die Lieferadressen nicht 'echt' sind, oder wenn sie bereits vorhanen sind.

Unterschiede anzeigen:

SL/CT.pm
845 845

  
846 846
  map { $form->{$_} = $ref->{$_} } keys %$ref;
847 847

  
848
  $query = qq|SELECT COUNT(shipto_id) AS used FROM (
849
    SELECT shipto_id FROM oe UNION
850
    SELECT shipto_id FROM ar UNION
851
    SELECT shipto_id FROM delivery_orders
852
  ) AS stid WHERE shipto_id = ? OR ? = 0|;
853
  ($form->{shiptoused}) = selectfirst_array_query($form, $dbh, $query, ($form->{shipto_id})x2);
854

  
848 855
  $sth->finish;
849 856
  $dbh->disconnect;
850 857

  
bin/mozilla/ct.pl
577 577

  
578 578
  CT->get_shipto(\%myconfig, \%$form);
579 579
  print $cgi->header(),  join '__pjx__', map $form->{"shipto$_"},
580
    qw(name department_1 department_2 street zipcode city country contact phone fax email);
580
    qw(name department_1 department_2 street zipcode city country contact phone fax email used);
581 581
  $lxdebug->leave_sub();
582 582

  
583 583
}
locale/de/all
438 438
  'Delete'                      => 'L?schen',
439 439
  'Delete Account'              => 'Konto l?schen',
440 440
  'Delete Dataset'              => 'Datenbank l?schen',
441
  'Delete Shipto'               => 'Lieferadresse löschen',
441 442
  'Delete delivery order'       => 'Lieferschein löschen',
442 443
  'Delete drafts'               => 'Entw?rfe l?schen',
443 444
  'Delete group'                => 'Gruppe löschen',
locale/de/ct
235 235
  'erfassen'                    => 'add',
236 236
  'weiter'                      => 'continue',
237 237
  'l?schen'                     => 'delete',
238
  'lieferadresse_löschen'  => 'delete_shipto',
238 239
  'neue_ware'                   => 'new_part',
239 240
  'speichern'                   => 'save',
240 241
  'speichern_und_debitorenbuchung_erfassen' => 'save_and_ar_transaction',
locale/de/ic
201 201
  'Pick List'                   => 'Sammelliste',
202 202
  'Please enter values'         => 'Bitte Werte eingeben',
203 203
  'Postscript'                  => 'Postscript',
204
  'Preis'                       => 'Preis',
205
  'Preisklasse'                 => 'Preisgruppe',
206 204
  'Price'                       => 'Preis',
207 205
  'Price Factor'                => 'Preisfaktor',
208 206
  'Pricegroup'                  => 'Preisgruppe',
templates/webpages/ct/form_header_de.html
235 235
             name       = 'shipto_id',
236 236
             id         = 'shipto_id',
237 237
             DATA       = SHIPTO,
238
             onChange   = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail'])",
238
             onChange   = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto])",
239 239
             id_key     = 'shipto_id',
240 240
             label_sub  = 'shipto_label',
241 241
             label_key  = 'shipto_label',
......
302 302
     </tr>
303 303
    </table>
304 304

  
305
    <input type="submit" id="delete_shipto" name="delete_shipto" value="Lieferadresse l&ouml;schen" disabled>
305 306
    <br style="clear: left" />
306 307
   </div>
307 308

  
......
593 594
       Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
594 595
       Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
595 596
       //-->
597

  
598
   function enable_delete_shipto(used){ var s=document.getElementById('delete_shipto'); if (s) s.disabled = (used > 0 ? true : false); }
596 599
  </script>
templates/webpages/ct/form_header_master.html
235 235
             name       = 'shipto_id',
236 236
             id         = 'shipto_id',
237 237
             DATA       = SHIPTO,
238
             onChange   = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail'])",
238
             onChange   = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto])",
239 239
             id_key     = 'shipto_id',
240 240
             label_sub  = 'shipto_label',
241 241
             label_key  = 'shipto_label',
......
302 302
     </tr>
303 303
    </table>
304 304

  
305
    <input type="submit" id="delete_shipto" name="delete_shipto" value="<translate>Delete Shipto</translate>" disabled>
305 306
    <br style="clear: left" />
306 307
   </div>
307 308

  
......
593 594
       Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
594 595
       Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
595 596
       //-->
597

  
598
   function enable_delete_shipto(used){ var s=document.getElementById('delete_shipto'); if (s) s.disabled = (used > 0 ? true : false); }
596 599
  </script>

Auch abrufbar als: Unified diff