]> git.wh0rd.org Git - tt-rss.git/commitdiff
pref-prefs: show disabled register certificate button when certificate is unavailable
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 28 Mar 2011 07:39:50 +0000 (11:39 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 28 Mar 2011 07:39:50 +0000 (11:39 +0400)
modules/pref-prefs.php

index ab54ea17407f3efe38525f2754f03424cbd98d7f..b9cc24330e75cae3922eda3d5bd893759a2043c2 100644 (file)
                                                name=\"$pref_name\" value=\"$value\">";
 
                                        $cert_serial = htmlspecialchars(get_ssl_certificate_id());
+                                       $has_serial = ($cert_serial) ? "false" : "true";
 
-                                       if ($cert_serial) {
-                                               print " <button dojoType=\"dijit.form.Button\"
-                                                       onclick=\"insertSSLserial('$cert_serial')\">" .
-                                                       __('Register') . "</button>";
-                                       }
+                                       print " <button dojoType=\"dijit.form.Button\" disabled=\"$has_serial\"
+                                               onclick=\"insertSSLserial('$cert_serial')\">" .
+                                               __('Register') . "</button>";
 
                                        print " <button dojoType=\"dijit.form.Button\"
                                                onclick=\"insertSSLserial('')\">" .