Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[ljcom] r10938: LJSUP-9642: Disable buttons Preview and ...

Committer: szhirkov
LJSUP-9642: Disable buttons Preview and Promote
U   trunk/templates/Shop/SelfPromo.tmpl
Modified: trunk/templates/Shop/SelfPromo.tmpl
===================================================================
--- trunk/templates/Shop/SelfPromo.tmpl	2011-08-31 02:21:16 UTC (rev 10937)
+++ trunk/templates/Shop/SelfPromo.tmpl	2011-08-31 03:18:25 UTC (rev 10938)
@@ -65,7 +65,7 @@
 			</div>
 			<fieldset class="submit-options">
 				<button type="button" id="selfpromo-preview-button">Preview</button>
-				<button type="submit"><TMPL_VAR expr="ml('/shop/selfpromo.bml.btn.submit')"></button>
+				<button type="submit" id="selfpromo-promote-button"><TMPL_VAR expr="ml('/shop/selfpromo.bml.btn.submit')"></button>
 			</fieldset>
 		</div>
 </TMPL_UNLESS>
@@ -77,6 +77,14 @@
     };
 
     jQuery(function($) {
+		$('#entry_link')
+			.change(function(e) {
+				var fieldIsEmpty = $(this).val() === '';
+				$('#selfpromo-preview-button, #selfpromo-promote-button')
+					.prop('disabled', fieldIsEmpty);
+			})
+			.change();
+
         $("#selfpromo-preview-button").click(function(e) {
             e.preventDefault();
 

Tags: aralot, ljcom, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments