Commit 69361a7c authored by lindonb's avatar lindonb

[FIX] registration and antibot forms needed alignment fixing

parent ed599af8
......@@ -705,6 +705,7 @@ function wikiplugin_tracker($data, $params)
$smarty->assign('register_groupchoice', $smarty->fetch('register-groupchoice.tpl'));
if ($prefs['feature_antibot'] == 'y') {
$smarty->assign('showantibot', true);
$smarty->assign('form', 'register');
$smarty->assign('register_antibot', $smarty->fetch('antibot.tpl'));
}
$wiki = $prefs["user_register_prettytracker_tpl"];
......@@ -1512,8 +1513,15 @@ function wikiplugin_tracker($data, $params)
$status_input = $smarty->fetch('tracker_status_input.tpl');
}
$labelclass = 'col-md-3';
$inputclass = 'col-md-9';
$buttonclass = 'col-md-9 col-md-offset-3';
if ($registration == "y") {
$back .= '<input type="hidden" name="register" value="Register" />';
$labelclass = 'col-md-4 col-sm-3';
$inputclass = 'col-md-4 col-sm-6';
$buttonclass = 'col-md-8 col-md-offset-4';
}
// Loop on tracker fields and display form
......@@ -1596,9 +1604,9 @@ function wikiplugin_tracker($data, $params)
if (!empty($colwidth)) {
$back .= " width='".$colwidth."'";
}
$back .= '><label class="col-md-3 control-label" for="' . $f['ins_id'] . '">' // ><label for="'
$back .= '><label class="' . $labelclass . ' control-label" for="' . $f['ins_id'] . '">' // ><label for="'
. wikiplugin_tracker_name($f['fieldId'], tra($f['name']), $field_errors); //
if ($showmandatory == 'y' and $f['isMandatory'] == 'y') {
if ($showmandatory == 'y' and $f['isMandatory'] == 'y'&& $registration != 'y') {
$back.= "&nbsp;<strong class='mandatory_star'>*</strong>&nbsp;";
}
$back .= '</label>';
......@@ -1607,10 +1615,14 @@ function wikiplugin_tracker($data, $params)
if (!$isTextOnSameRow) {
$back.= "<br/>";
} else {
$back.= '<div class="col-md-9 tracker_input_value tracker_field' . $f['fieldId'] . '">'; // '</td><td class="tracker_input_value">';
$back.= '<div class="' . $inputclass . ' tracker_input_value tracker_field' . $f['fieldId'] . '">'; // '</td><td class="tracker_input_value">';
}
$back .= wikiplugin_tracker_render_input($f, $item, $dynamicSave)."</div>"; // chibaguy added /divs
if ($showmandatory == 'y' and $f['isMandatory'] == 'y' && $registration == 'y') {
$back.= '<div class="col-md-1 col-sm-1"><span class="text-danger tips" title=":'
. tra('This field is manadatory') . '">*</span></div>';
}
if ($isTextOnSameRow) {
$back .= '</div>';
......@@ -1679,12 +1691,15 @@ FILL;
$smarty->assign('antibot_table', empty($wiki) && empty($tpl)?'n': 'y');
$captchalib = TikiLib::lib('captcha');
$smarty->assign('captchalib', $captchalib);
if ($registration == 'y') {
$smarty->assign('form', 'register');
}
$back .= $smarty->fetch('antibot.tpl');
}
$back .= '</div>';
if ($params['formtag'] == 'y') {
$back .= '<div class="form-group"><div class="col-md-3"></div><div class="input_submit_container col-md-9 btn-bar">';
$back .= '<div class="form-group"><div class="input_submit_container btn-bar ' . $buttonclass . '">';
if (!empty($reset)) {
$back .= '<input class="button submit preview" type="reset" name="tr_reset" value="'.tra($reset).'" />';
......@@ -1698,7 +1713,7 @@ FILL;
$back .= '</div></div>';
}
if ($showmandatory == 'y' and $onemandatory) {
$back.= "<div class='form-group'><div class='col-md-3'></div><div class='col-md-9'><div class='text-center alert alert-danger'><em>".tra("Fields marked with an * are mandatory.")."</em></div></div></div>";
$back.= "<div class='form-group'><div class='" . $buttonclass . "'><div class='text-center alert alert-danger'><em>".tra("Fields marked with an * are mandatory.")."</em></div></div></div>";
}
if ($params['formtag'] == 'y') {
$back.= '</form>';
......
......@@ -50,7 +50,7 @@
{preference name=useRegisterPasscode}
<div class="adminoptionboxchild" id="useRegisterPasscode_childcontainer">
{preference name=registerPasscode}
<div class="form-group col-sm-8 col-sm-offset-4">
<div class="col-sm-8 col-sm-offset-4">
<span id="genPass">
{button href="#" _onclick="" _text="{tr}Generate a passcode{/tr}"}
</span>
......
{* $Id$ *}
{if empty($user) || $user eq 'anonymous' || !empty($showantibot)}
{$labelclass = 'col-md-3'}
{$inputclass = 'col-md-9'}
{$captchaclass = 'col-md-5 col-sm-7 col-sm-offset-3'}
{if $form === 'register'}
{$labelclass = 'col-md-4 col-sm-3'}
{$inputclass = 'col-md-4 col-sm-6'}
{$captchaclass = 'col-md-5 col-sm-7 col-md-offset-4 col-sm-offset-3'}
{/if}
<div class="form-group">
{if $captchalib->type eq 'recaptcha'}
{$captchalib->render()}
<div class="form-group">
<div class="{$captchaclass}">
{$captchalib->render()}
</div>
</div>
{elseif $captchalib->type eq 'questions'}
<input type="hidden" name="captcha[id]" id="captchaId" value="{$captchalib->generate()}">
<label class="col-md-4 col-sm-3 control-label">
{$captchalib->render()}
{if $showmandatory eq 'y'}<span class="mandatory_star"> *</span>{/if}
</label>
<div class="col-md-8 col-sm-9">
<input class="form-control" type="text" maxlength="8" size="22" name="captcha[input]" id="antibotcode">
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label">
{$captchalib->render()}
</label>
<div class="{if !empty($inputclass)}{$inputclass}{else}col-md-8 col-sm-9{/if}">
<input class="form-control" type="text" maxlength="8" size="22" name="captcha[input]" id="antibotcode">
</div>
{if $showmandatory eq 'y'}
<div class="col-md-1 col-sm-1">
<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>
</div>
{/if}
</div>
{else}
<input type="hidden" name="captcha[id]" id="captchaId" value="{$captchalib->generate()}">
<label class="control-label" for="antibotcode">{tr}Enter what you see{/tr}{if $showmandatory eq 'y'}<span class="attention"> *</span>{/if}</label>
<input class="form-control" type="text" maxlength="8" size="22" name="captcha[input]" id="antibotcode">
{if $captchalib->type eq 'default'}
<img id="captchaImg" src="{$captchalib->getPath()}" alt="{tr}Anti-Bot verification code image{/tr}" height="50">
{else}
{* dumb captcha *}
{$captchalib->render()}
{/if}
{/if}
{if $captchalib->type eq 'default'}
{button _id='captchaRegenerate' _class='' href='#antibot' _text='{tr}Try another code{/tr}' _icon_name="refresh" _onclick="generateCaptcha();return false;"}
<div class="form-group">
<label class="control-label {$labelclass}" for="antibotcode">{tr}Enter the code below{/tr}{if $showmandatory eq 'y' && $form ne 'register'}<strong class="mandatory_star"> *</strong>{/if}</label>
<div class="{if !empty($inputclass)}{$inputclass}{else}col-md-8 col-sm-9{/if}">
<input class="form-control" type="text" maxlength="8" name="captcha[input]" id="antibotcode">
</div>
{if $showmandatory eq 'y'}
<div class="col-md-1 col-sm-1">
<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>
</div>
{/if}
</div>
<div class="form-group">
<div class="{$captchaclass}">
{if $captchalib->type eq 'default'}
<img id="captchaImg" src="{$captchalib->getPath()}" alt="{tr}Anti-Bot verification code image{/tr}" height="50">
{else}
{* dumb captcha *}
{$captchalib->render()}
{/if}
</div>
{if $captchalib->type eq 'default'}
{button _id='captchaRegenerate' _class='' href='#antibot' _text='{tr}Try another code{/tr}' _icon_name="refresh" _onclick="generateCaptcha();return false;"}
{/if}
</div>
{/if}
</div>
{/if}
......
......@@ -5,8 +5,7 @@
{else}
{if $prefs.login_is_email ne 'y'}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="email">{tr}Email:{/tr}</label>
{if $trackerEditFormId}&nbsp;<strong class='mandatory_star'>*</strong>&nbsp;{/if}
<label class="col-md-4 col-sm-3 control-label" for="email">{tr}Email{/tr}</label>
<div class="col-md-4 col-sm-6">
<input class="form-control" type="text" id="email" name="email" value="{if !empty($smarty.post.email)}{$smarty.post.email}{/if}">
{if $prefs.validateUsers eq 'y' and $prefs.validateEmail ne 'y'}
......@@ -15,6 +14,9 @@
</p>
{/if}
</div>
<div class="col-sm-1">
{if $trackerEditFormId}<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>{/if}
</div>
</div>
{/if}
{/if}
......@@ -5,14 +5,16 @@
{include file="register-pass2.tpl"}
{include file="register-email.tpl"}
{* Custom fields *}
{section name=ir loop=$customfields}
{if $customfields[ir].show}
<div class="form-group">
<label class="col-md-4 control-label" for="{$customfields[ir].prefName}">{tr}{$customfields[ir].label}:{/tr}</label>
<div class="col-md-4">
<input type="{$customfields[ir].type}" name="{$customfields[ir].prefName}" value="{$customfields[ir].value}" size="{$customfields[ir].size}" id="{$customfields[ir].prefName}">
{if isset($customfields)}
{section name=ir loop=$customfields}
{if $customfields[ir].show}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="{$customfields[ir].prefName}">{tr}{$customfields[ir].label}:{/tr}</label>
<div class="col-md-4 col-sm-6">
<input type="{$customfields[ir].type}" name="{$customfields[ir].prefName}" value="{$customfields[ir].value}" size="{$customfields[ir].size}" id="{$customfields[ir].prefName}">
</div>
</div>
</div>
{/if}
{/section}
{/if}
{/section}
{/if}
{include file="register-groupchoice.tpl"}
{* $Id$ *}
{if $prefs.user_register_prettytracker eq 'y' and $prefs.user_register_prettytracker_tpl and $prefs.socialnetworks_user_firstlogin != 'y'}
<input type="text" name="name" id="name">
&nbsp;<strong class='mandatory_star'>*</strong>
<span class='text-danger'>*</span>
{else}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="name">{if $prefs.login_is_email eq 'y'}{tr}Email:{/tr}{else}{tr}Username:{/tr}{/if}</label>
{if $trackerEditFormId}&nbsp;<strong class='mandatory_star'>*</strong>&nbsp;{/if}
<label class="col-md-4 col-sm-3 control-label" for="name">{if $prefs.login_is_email eq 'y'}{tr}Email{/tr}{else}{tr}Username{/tr}{/if}</label>
<div class="col-md-4 col-sm-6">
<input class="form-control" type="text" name="name" id="name" value="{if !empty($smarty.post.name)}{$smarty.post.name}{/if}">
{if $prefs.login_is_email eq 'y'}
......@@ -21,5 +20,8 @@
{/if}
{/if}
</div>
<div class="col-md-4 col-sm-3">
{if $trackerEditFormId}<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>{/if}
</div>
</div>
{/if}
......@@ -3,10 +3,9 @@
<input id='pass1' type="password" name="pass" onkeypress="regCapsLock(event)">
&nbsp;<strong class='mandatory_star'>*</strong>
{else}
{if $openid_associate neq 'y'}
{if !isset($openid_associate) || $openid_associate neq 'y'}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="pass1">{tr}Password:{/tr}</label>
{if $trackerEditFormId}&nbsp;<strong class='mandatory_star'>*</strong>&nbsp;{/if}
<label class="col-md-4 col-sm-3 control-label" for="pass1">{tr}Password{/tr}</label>
<div class="col-md-4 col-sm-6">
<input class="form-control" id='pass1' type="password" name="pass" onkeypress="regCapsLock(event)" value="{if !empty($smarty.post.pass)}{$smarty.post.pass}{/if}"
onkeyup="runPassword(this.value, 'mypassword');{if $prefs.feature_jquery_validation neq 'y' && !$userTrackerData}checkPasswordsMatch('#pass2', '#pass1', '#mypassword2_text');{/if}">
......@@ -18,6 +17,12 @@
{include file='password_help.tpl'}
{/if}
</div>
<div class="col-sm-1">
{if $trackerEditFormId}<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>{/if}
</div>
<div class="col-sm-2">
<input class="form-control" id='genepass' name="genepass" type="text" tabindex="0" size="10" style="display: none; width:160px">
</div>
</div>
{/if}
{/if}
......@@ -3,10 +3,9 @@
<input id='pass2' type="password" name="passAgain" onkeypress="regCapsLock(event)">
&nbsp;<strong class='mandatory_star'>*</strong>
{else}
{if $openid_associate neq 'y'}
{if !isset($openid_associate) || $openid_associate neq 'y'}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="pass2">{tr}Repeat password:{/tr}</label>
{if $trackerEditFormId}&nbsp;<strong class='mandatory_star'>*</strong>&nbsp;{/if}
<label class="col-md-4 col-sm-3 control-label" for="pass2">{tr}Repeat password{/tr}</label>
<div class="col-md-4 col-sm-6">
<input class="form-control" id='pass2' type="password" name="passAgain" onkeypress="regCapsLock(event)" value="{if !empty($smarty.post.passAgain)}{$smarty.post.passAgain}{/if}"
onkeyup="{if $prefs.feature_jquery_validation neq 'y' && !$userTrackerData}checkPasswordsMatch('#pass2', '#pass1', '#mypassword2_text');{/if}">
......@@ -15,10 +14,12 @@
</div>
{if $prefs.feature_jquery_validation neq 'y' && !$userTrackerData}<span id="checkpass"></span>{/if}
</div>
<div class="col-md-1 col-sm-1">
{if $trackerEditFormId}<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>{/if}
</div>
{if $prefs.generate_password eq 'y'}
{*if !$reg_in_module}<td>&nbsp;</td>{/if*}
<div class="col-md-4 col-sm-3 text-center{*if $reg_in_module} inmodule{/if*}">
<input id='genepass' name="genepass" type="text" tabindex="0" style="display: none">
<div class="col-md-3 col-sm-2{*if $reg_in_module} inmodule{/if*}">
<span id="genPass">
{if 0 and $prefs.feature_ajax eq 'y'}
{button href="#" _onclick="check_pass();" _text="{tr}Generate a password{/tr}"}
......
......@@ -5,12 +5,15 @@
{else}
{if $prefs.useRegisterPasscode eq 'y'}
<div class="form-group">
<label class="col-md-4 col-sm-3 control-label" for="passcode">{tr}Passcode to register:{/tr}&nbsp;<strong class='mandatory_star'>*</strong>
</label>
<label class="col-md-4 col-sm-3 control-label" for="passcode">{tr}Passcode to register{/tr}
</label>
<div class="col-md-4 col-sm-6">
<input class="form-control" required="" type="password" name="passcode" id="passcode" onkeypress="regCapsLock(event)" value="{if !empty($smarty.post.passcode)}{$smarty.post.passcode}{/if}"> <em class="help-block">{tr}Not your password.{/tr} <span id="passcode-help" style="display:none">{tr}To request a passcode, {if $prefs.feature_contact eq 'y'}<a href="tiki-contact.php">{/if}
contact the system administrator{if $prefs.feature_contact eq 'y'}</a>{/if}{/tr}.</span></em>
</div>
<div class="col-md-1 col-sm-1">
<span class='text-danger tips' title=":{tr}This field is manadatory{/tr}">*</span>
</div>
</div>
{/if}
{/if}
......
{* $Id$ *}
{title adminpage='login'}{tr}Registration{/tr}{/title}
{if $showmsg eq 'y'}
{if !empty($showmsg) && $showmsg eq 'y'}
<div class="simplebox highlight">
{$msg|nl2br}
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment