Entire rewrite of mail part in app! Not kidding here...
[mailer.git] / templates / de / html / member / member_surfbar_book_dynamic.tpl
index 3ad33dad596f06703f797918d3a05f6e0935aee6..91960585da90fb0601ce3edcec708a984cb47b70 100644 (file)
@@ -1,11 +1,21 @@
-<form action="{!URL!}/modules.php?module=login&amp;what=surfbar_book" method="post">
+<form id="book" action="{!URL!}/modules.php?module=login&amp;what=surfbar_book" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()">
 <div class="member_table dashed" style="width:600px;margin-top:10px">
        <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px">
                <strong>URL in Surfbar buchen - Dynamisch:</strong>
        </div>
 
+       <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+               URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="http://" />
+       </div>
+
        <div class="member_input" style="padding-top:5px;padding-bottom:5px">
-               URL eingeben: <input type="text" name="url" size="20" maxlength="255" value="http://" />
+               Soll die Anzahl Aufrufe begrenzt werden?<br />
+               <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N" checked="checked" /> {--NO--}
+               <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y" /> {--YES--}
+       </div>
+
+       <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+               Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="-" />
        </div>
 
        <div class="member_input" style="padding-top:5px;padding-bottom:5px">
                <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ADD_URL--}" />
        </div>
 </div>
+
+<script language="JavaScript" type="text/javascript">
+<!--
+var limit = document.getElementById('limit');
+var span = document.getElementById('span_limit');
+var old_limit = 0;
+
+function FocusLimitedNo () {
+       old_limit = limit.value;
+       limit.disabled = true;
+       limit.setAttribute('class', 'disabled');
+       limit.style.textAlign = 'center';
+       limit.value = '-';
+}
+
+function FocusLimitedYes () {
+       limit.disabled = false;
+       limit.setAttribute('class', 'member_normal');
+       limit.style.textAlign = 'left';
+       if (old_limit > 0) {
+               limit.value = old_limit;
+       } else {
+               limit.value = '';
+       }
+       limit.focus();
+}
+
+function SubmitForm () {
+       if (limit.value == '-') {
+               limit.value = 0;
+       }
+       return true;
+}
+
+function ResetForm () {
+       FocusLimitedNo();
+       old_limit = 0;
+       return true;
+}
+
+FocusLimitedNo();
+
+//-->
+</script>
 </form>
 
-<div align="center" class="member_note" style="padding:5px">
+<span align="center" class="member_note" style="padding:5px">
        Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf  richten sich nach
        verschiedenen Faktoren. Schauen Sie unter <a
         href="{!URL!}/modules.php?module=login&amp;what=surfbar_start">Surfbar starten</a>
        nach, wenn Sie genaueres dazu wissen m&ouml;chten.
-</div>
+</span>