mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 05:56:27 +02:00
coupon select and feedback
This commit is contained in:
parent
d2ef211f68
commit
7656e9d291
7 changed files with 67 additions and 58 deletions
|
@ -88,19 +88,21 @@ sub tpl(){
|
|||
$cttpos_count++;
|
||||
}
|
||||
|
||||
my $ctt_all = {};
|
||||
#$ctt = $db->collect_content2("contenttrans","int10",$ctrel->{c_id}) if($ctrel->{c_id});
|
||||
#
|
||||
#loop operator hash to get invoices for each operator
|
||||
my $ctt_all = {};
|
||||
my $ctadrcoupon = {};
|
||||
foreach my $sharee_operator (keys (%$operator_hash)){
|
||||
my $dbh_operator = $dbt->dbconnect_extern("$sharee_operator");
|
||||
my $pref = {
|
||||
table => "contenttrans",
|
||||
fetch => "all",
|
||||
int10 => "$ctrel->{c_id}",
|
||||
keyfield => "c_id",
|
||||
table => "contenttrans",
|
||||
fetch => "all",
|
||||
int10 => "$ctrel->{c_id}",
|
||||
keyfield => "c_id",
|
||||
};
|
||||
|
||||
|
||||
if($ctrel->{c_id}){
|
||||
my $ctt = $dbt->fetch_tablerecord($dbh_operator,$pref);
|
||||
foreach my $id (keys(%$ctt)){
|
||||
|
@ -109,6 +111,15 @@ sub tpl(){
|
|||
#print "$ctt->{$id}->{praefix}|";
|
||||
}
|
||||
$ctt_all = { %$ctt_all, %$ctt };
|
||||
|
||||
my $prefcoupon = {
|
||||
table => "contentadr",
|
||||
fetch => "one",
|
||||
txt15 => "~::\\w",
|
||||
c_id => "$ctrel->{c_id}",
|
||||
};
|
||||
|
||||
$ctadrcoupon->{$sharee_operator} = $dbt->fetch_tablerecord($dbh_operator,$prefcoupon);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -501,10 +512,27 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
# $label_des = "<span style=color:$red>Das Passwort ist zu kurz.</span>";
|
||||
#}
|
||||
|
||||
elsif($key eq "txt15" && ($R::failure && $R::failure =~ /conflict_txt15/)){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer kann pro Registrierung nur einmal verwendet werden. So wird verhindert dass weitere Personen von den 30-Freiminuten widerrechtlich Gebrauch nehmen.<br />
|
||||
elsif($key eq "txt15"){
|
||||
if($R::failure){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer ist leider nicht vorhanden. Bei nicht vorhandener Nummer das Feld bitte leer lassen.</span>";
|
||||
}
|
||||
if($R::failure =~ /conflict_txt15/){#TODO
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer kann pro Registrierung nur einmal verwendet werden. So wird verhindert dass weitere Personen von den 30-Freiminuten widerrechtlich Gebrauch nehmen.<br />
|
||||
Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weitere Produkte (Gas, SeeConnect, Fähre- oder Bus-Zeitkarten) nutzen. Dann könnte sich die zweite Person mit der weiteren Nummer registrieren.</span>";
|
||||
}
|
||||
|
||||
my $saved_coupon = "";
|
||||
$saved_coupon = "$ctadrcoupon->{sharee_kn}->{txt15}" if($ctadrcoupon->{sharee_kn}->{txt15});
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='$saved_coupon' override placeholder='$des' $autofocus />\n";
|
||||
print $q->div(" ");
|
||||
foreach my $opid (keys(%$ctadrcoupon)){
|
||||
if($ctadrcoupon->{$opid}->{txt15} && ($aowner != 195 && $aowner != 185 && $aowner != 176)){
|
||||
print $q->div("Gespeicherte Bonusnummer: $ctadrcoupon->{$opid}->{txt15}"),"\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
elsif($key eq "txt04" && $R::failure && $R::failure =~ /confirm_txt04/){
|
||||
$autofocus = "autofocus";
|
||||
|
@ -515,14 +543,13 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
|
|||
$label_des = "<span style=color:$red>Bitte \"$des\" Angabe korrigieren</span>";
|
||||
$label_des = "<span style=color:$red>Für das \"$des\" liegt ein Fehler vor.</span>" if($key eq "txt04");
|
||||
$label_des = "<span style=color:$red>Bitte mobile Telefon Nr. mit Ländervorwahl, Beispiel: +49 170 12345678</span>" if($key eq "txt07");
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer ist leider nicht vorhanden. Bei nicht vorhandener Nummer das Feld bitte leer lassen.</span>" if($key =~ /txt15/);
|
||||
}
|
||||
#if($R::success eq $key){
|
||||
# $label_des = "<span>Das hat geklappt. Der \"$des\" wurde erfolgreich hinzugefügt, s.u..</span>";
|
||||
#}
|
||||
|
||||
|
||||
if($key eq "txt04"){
|
||||
elsif($key eq "txt04"){
|
||||
my $pw = "xxxxxxxx";
|
||||
$pw = "" if(!$ctrel->{c_id});
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue