[livejournal] r22656: LJSUP-13017: Paid Repost in update.bml a...

Committer: esavintcev
LJSUP-13017: Paid Repost in update.bml and editjournal.bml
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
U   trunk/htdocs/stc/entry.css
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-08-15 12:05:53 UTC (rev 22655)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2012-08-15 12:37:43 UTC (rev 22656)
@@ -895,7 +895,7 @@
 
             my $checkbox = LJ::html_check({
                 'type'     => 'check',
-                'class'    => 'paid_repost_on',
+                'class'    => 'b-updatepage-paidrepost-check',
                 'value'    => '1',
                 'name'     => 'paid_repost_on',
                 'id'       => 'paid_repost_on',
@@ -909,8 +909,15 @@
                 LJ::Lang::ml('entryform.paid_repost.current_budget', {qty => $budget}) : 
                 '' ;
 
-            $out .= qq{$checkbox $checkbox_text $current_budget <br />};
+            my $help = LJ::help_icon_html('paid_repost');
 
+            $out .= qq{<span class="b-updatepage-paidrepost-agreement">};
+            $out .= qq{$checkbox};
+            $out .= qq{<label for="paid_repost_on" class="b-updatepage-paidrepost-label">$checkbox_text</label>};
+            $out .= qq{$help};
+            $out .= qq{<strong class="b-updatepage-paidrepost-current">$current_budget</strong>};
+            $out .= qq{</span>};
+
             my ($label, $opts);
             unless ($offer) {
                 $opts = {
@@ -920,10 +927,11 @@
                 };
                 $label = LJ::Lang::ml('entryform.paid_repost.budget');
             } else {
-                $out .= LJ::html_hidden({ 'name' => 'revoke_repost_offer' });
+                $label .= LJ::html_hidden({ 'name' => 'revoke_repost_offer' });
                 
                 $opts = {
                     'name'  => 'add_repost_budget',
+                    'id'    => 'repost_budget',
                     'value' => $opts->{add_repost_budget},
                 };
 
@@ -938,7 +946,10 @@
                 %$opts,
             });
 
-            $out .= "$label  $field";
+            $out .= qq{<span class="b-updatepage-paidrepost-fields">};
+            $out .= qq{<label for="repost_budget" class="b-updatepage-paidrepost-label">$label</label>};
+            $out .= qq{<span class="b-updatepage-paidrepost-budget">$field</span>};
+            $out .= qq{</span>};
 
             return $out;
         },         

Modified: trunk/htdocs/stc/entry.css
===================================================================
--- trunk/htdocs/stc/entry.css	2012-08-15 12:05:53 UTC (rev 22655)
+++ trunk/htdocs/stc/entry.css	2012-08-15 12:37:43 UTC (rev 22656)
@@ -940,3 +940,34 @@
 			border-bottom: 1px solid #3F5F9E;
 			}
 
+
+
+/* paid repost */
+.b-updatepage-paidrepost {
+	}
+	.b-updatepage-paidrepost-agreement {
+		display: block;
+		font-size: 11px;
+		}
+	.b-updatepage-paidrepost-fields {
+		display: block;
+		padding: 5px 0;
+		font-size: 11px;
+		}
+		.b-updatepage-paidrepost-label {
+			}
+		.b-updatepage-paidrepost-check {
+			margin: 0 0.5em 0 0;
+			}
+		.b-updatepage-paidrepost-current {
+			margin: 0 0 0 1.5em;
+			}
+		.b-updatepage-paidrepost-budget {
+			margin: 0 0 0 0.5em;
+			padding: 0 20px 0 0;
+			background: url(/img/icons/paidrepost.png?v=1) no-repeat 100% 50%;
+			}
+	.b-updatepage-paidrepost-unchecked .b-updatepage-paidrepost-fields {
+		opacity: 0.3;
+		}
+