Merge pull request #9684 from MrPetovan/bug/9678-required-translation

Add translation to untranslated strings in templates
This commit is contained in:
Michael Vogel 2020-12-20 16:27:31 +01:00 committed by GitHub
commit 4ee029c9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 200 additions and 552 deletions

View File

@ -87,7 +87,7 @@ Field parameter:
1. Label for the input box,
2. Current value of the variable,
3. Help text for the input box,
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
4. Should be set to the translation of "Required" to mark this field as required,
5. if set to "autofocus" modern browser will put the cursur into this box once the page is loaded,
6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types).
@ -122,7 +122,7 @@ Field parameter:
1. Label for the field,
2. Value for the field, e.g. the old password,
3. Help text for the input field,
4. if set to "required" modern browser will check that this field is filled out,
4. Should be set to the translation of "Required" to mark this field as required,
5. if set to "autofocus" modern browser will put the cursor automatically into this input field.
### field_radio.tpl
@ -176,5 +176,5 @@ Field parameter:
0. Name of the input field,
1. Label for the input box,
2. Current text for the box,
3. Help text for the input box.
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
3. Help text for the input box,
4. Should be set to the translation of "Required" to mark this field as required.

View File

@ -76,8 +76,8 @@ class Server extends BaseAdmin
if (is_array($blocklist)) {
foreach ($blocklist as $id => $b) {
$blocklistform[] = [
'domain' => ["domain[$id]", DI::l10n()->t('Blocked server domain pattern'), $b['domain'], '', 'required', '', ''],
'reason' => ["reason[$id]", DI::l10n()->t("Reason for the block"), $b['reason'], '', 'required', '', ''],
'domain' => ["domain[$id]", DI::l10n()->t('Blocked server domain pattern'), $b['domain'], '', DI::l10n()->t('Required'), '', ''],
'reason' => ["reason[$id]", DI::l10n()->t("Reason for the block"), $b['reason'], '', DI::l10n()->t('Required'), '', ''],
'delete' => ["delete[$id]", DI::l10n()->t("Delete server domain pattern") . ' (' . $b['domain'] . ')', false, DI::l10n()->t("Check to delete this entry from the blocklist")]
];
}
@ -96,8 +96,8 @@ class Server extends BaseAdmin
<li><code>[&lt;char1&gt;&lt;char2&gt;...]</code>: char1 or char2</li>
</ul>'),
'$addtitle' => DI::l10n()->t('Add new entry to block list'),
'$newdomain' => ['newentry_domain', DI::l10n()->t('Server Domain Pattern'), '', DI::l10n()->t('The domain pattern of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''],
'$newreason' => ['newentry_reason', DI::l10n()->t('Block reason'), '', DI::l10n()->t('The reason why you blocked this server domain pattern.'), 'required', '', ''],
'$newdomain' => ['newentry_domain', DI::l10n()->t('Server Domain Pattern'), '', DI::l10n()->t('The domain pattern of the new server to add to the block list. Do not include the protocol.'), DI::l10n()->t('Required'), '', ''],
'$newreason' => ['newentry_reason', DI::l10n()->t('Block reason'), '', DI::l10n()->t('The reason why you blocked this server domain pattern.'), DI::l10n()->t('Required'), '', ''],
'$submit' => DI::l10n()->t('Add Entry'),
'$savechanges' => DI::l10n()->t('Save changes to the blocklist'),
'$currenttitle' => DI::l10n()->t('Current Entries in the Blocklist'),

View File

@ -67,7 +67,7 @@ class Delete extends BaseAdmin
'$submit' => DI::l10n()->t('Delete this Item'),
'$intro1' => DI::l10n()->t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
'$intro2' => DI::l10n()->t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
'$deleteitemguid' => ['deleteitemguid', DI::l10n()->t("GUID"), '', DI::l10n()->t("The GUID of the item you want to delete."), 'required', 'autofocus'],
'$deleteitemguid' => ['deleteitemguid', DI::l10n()->t("GUID"), '', DI::l10n()->t("The GUID of the item you want to delete."), DI::l10n()->t('Required'), 'autofocus'],
'$form_security_token' => self::getFormSecurityToken("admin_deleteitem")
]);
}

View File

@ -54,7 +54,7 @@ class Probe extends BaseModule
DI::l10n()->t('Lookup address'),
$addr,
'',
'required'
DI::l10n()->t('Required')
],
'$res' => $res,
]);

View File

@ -186,6 +186,10 @@ class Install extends BaseModule
$output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title,
'$pass' => DI::l10n()->t('System check'),
'$required' => DI::l10n()->t('Required'),
'$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'),
'$optional_requirement_not_satisfied' => DI::l10n()->t('Optional requirement not satisfied'),
'$ok' => DI::l10n()->t('OK'),
'$checks' => self::$installer->getChecks(),
'$passed' => $status,
'$see_install' => DI::l10n()->t('Please see the file "doc/INSTALL.md".'),
@ -215,12 +219,12 @@ class Install extends BaseModule
DI::l10n()->t('Host name'),
$configCache->get('config', 'hostname'),
DI::l10n()->t('Overwrite this field in case the determinated hostname isn\'t right, otherweise leave it as is.'),
'required'],
DI::l10n()->t('Required')],
'$basepath' => ['system-basepath',
DI::l10n()->t("Base path to installation"),
$configCache->get('system', 'basepath'),
DI::l10n()->t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),
'required'],
DI::l10n()->t('Required')],
'$urlpath' => ['system-urlpath',
DI::l10n()->t('Sub path of the URL'),
$configCache->get('system', 'urlpath'),
@ -239,7 +243,9 @@ class Install extends BaseModule
'$info_01' => DI::l10n()->t('In order to install Friendica we need to know how to connect to your database.'),
'$info_02' => DI::l10n()->t('Please contact your hosting provider or site administrator if you have questions about these settings.'),
'$info_03' => DI::l10n()->t('The database you specify below should already exist. If it does not, please create it before continuing.'),
'checks' => self::$installer->getChecks(),
'$required' => DI::l10n()->t('Required'),
'$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'),
'$checks' => self::$installer->getChecks(),
'$hostname' => $configCache->get('config', 'hostname'),
'$ssl_policy' => $configCache->get('system', 'ssl_policy'),
'$basepath' => $configCache->get('system', 'basepath'),
@ -248,23 +254,23 @@ class Install extends BaseModule
DI::l10n()->t('Database Server Name'),
$configCache->get('database', 'hostname'),
'',
'required'],
DI::l10n()->t('Required')],
'$dbuser' => ['database-username',
DI::l10n()->t('Database Login Name'),
$configCache->get('database', 'username'),
'',
'required',
DI::l10n()->t('Required'),
'autofocus'],
'$dbpass' => ['database-password',
DI::l10n()->t('Database Login Password'),
$configCache->get('database', 'password'),
DI::l10n()->t("For security reasons the password must not be empty"),
'required'],
DI::l10n()->t('Required')],
'$dbdata' => ['database-database',
DI::l10n()->t('Database Name'),
$configCache->get('database', 'database'),
'',
'required'],
DI::l10n()->t('Required')],
'$lbl_10' => DI::l10n()->t('Please select a default timezone for your website'),
'$php_path' => $configCache->get('config', 'php_path'),
'$submit' => DI::l10n()->t('Submit')
@ -278,6 +284,7 @@ class Install extends BaseModule
$tpl = Renderer::getMarkupTemplate('install_settings.tpl');
$output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title,
'$required' => DI::l10n()->t('Required'),
'$checks' => self::$installer->getChecks(),
'$pass' => DI::l10n()->t('Site settings'),
'$hostname' => $configCache->get('config', 'hostname'),
@ -292,7 +299,7 @@ class Install extends BaseModule
DI::l10n()->t('Site administrator email address'),
$configCache->get('config', 'admin_email'),
DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'),
'required', 'autofocus', 'email'],
DI::l10n()->t('Required'), 'autofocus', 'email'],
'$timezone' => Temporal::getTimezoneField('system-default_timezone',
DI::l10n()->t('Please select a default timezone for your website'),
$configCache->get('system', 'default_timezone'),
@ -318,10 +325,12 @@ class Install extends BaseModule
$tpl = Renderer::getMarkupTemplate('install_finished.tpl');
$output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title,
'$checks' => self::$installer->getChecks(),
'$pass' => DI::l10n()->t('Installation finished'),
'$text' => $db_return_text . self::whatNext(),
'$title' => $install_title,
'$required' => DI::l10n()->t('Required'),
'$requirement_not_satisfied' => DI::l10n()->t('Requirement not satisfied'),
'$checks' => self::$installer->getChecks(),
'$pass' => DI::l10n()->t('Installation finished'),
'$text' => $db_return_text . self::whatNext(),
]);
break;

View File

@ -231,9 +231,10 @@ class Profile extends BaseProfile
);
}
$tpl = Renderer::getMarkupTemplate('profile/index.tpl');
$tpl = Renderer::getMarkupTemplate('profile/profile.tpl');
$o .= Renderer::replaceMacros($tpl, [
'$title' => DI::l10n()->t('Profile'),
'$yourself' => DI::l10n()->t('Yourself'),
'$view_as_contacts' => $view_as_contacts,
'$view_as_contact_id' => $view_as_contact_id,
'$view_as_contact_alert' => $view_as_contact_alert,

View File

@ -132,7 +132,7 @@ class Register extends BaseModule
$o = Renderer::replaceMacros($tpl, [
'$invitations' => DI::config()->get('system', 'invitation_only'),
'$permonly' => intval(DI::config()->get('config', 'register_policy')) === self::APPROVE,
'$permonlybox' => ['permonlybox', DI::l10n()->t('Note for the admin'), '', DI::l10n()->t('Leave a message for the admin, why you want to join this node'), 'required'],
'$permonlybox' => ['permonlybox', DI::l10n()->t('Note for the admin'), '', DI::l10n()->t('Leave a message for the admin, why you want to join this node'), DI::l10n()->t('Required')],
'$invite_desc' => DI::l10n()->t('Membership on this site is by invitation only.'),
'$invite_label' => DI::l10n()->t('Your invitation code: '),
'$invite_id' => $invite_id,

View File

@ -82,7 +82,7 @@ class Verify extends BaseModule
'$errors_label' => DI::l10n()->tt('Error', 'Errors', count(self::$errors)),
'$errors' => self::$errors,
'$recovery_message' => DI::l10n()->t('Dont have your phone? <a href="%s">Enter a two-factor recovery code</a>', '2fa/recovery'),
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"', 'tel'],
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', DI::l10n()->t('Required'), 'autofocus placeholder="000000"', 'tel'],
'$verify_label' => DI::l10n()->t('Verify code and complete login'),
]);
}

View File

@ -125,7 +125,7 @@ class Index extends BaseSettings
'$app_specific_passwords_message' => DI::l10n()->t('<p>These randomly generated passwords allow you to authenticate on apps not supporting two-factor authentication.</p>'),
'$action_title' => DI::l10n()->t('Actions'),
'$password' => ['password', DI::l10n()->t('Current password:'), '', DI::l10n()->t('You need to provide your current password to change two-factor authentication settings.'), 'required', 'autofocus'],
'$password' => ['password', DI::l10n()->t('Current password:'), '', DI::l10n()->t('You need to provide your current password to change two-factor authentication settings.'), DI::l10n()->t('Required'), 'autofocus'],
'$enable_label' => DI::l10n()->t('Enable two-factor authentication'),
'$disable_label' => DI::l10n()->t('Disable two-factor authentication'),
'$recovery_codes_label' => DI::l10n()->t('Show recovery codes'),

View File

@ -138,7 +138,7 @@ class Verify extends BaseSettings
'$holder' => $holder,
'$secret' => $secret,
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"'],
'$verify_code' => ['verify_code', DI::l10n()->t('Please enter a code from your authentication app'), '', '', DI::l10n()->t('Required'), 'autofocus placeholder="000000"'],
'$verify_label' => DI::l10n()->t('Verify code and enable two-factor authentication'),
]);
}

View File

@ -652,3 +652,7 @@ body.dragging, body.dragging * {
border-left-color: black;
border-right: none;
}
span.required {
color: #c80000;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field range">
{{if !isset($label) || $label != false }}
<label for="{{$field.0}}_range" id="label_{{$field.0}}">{{$field.1 nofilter}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
<label for="{{$field.0}}_range" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
{{/if}}
<div class="row">
<div class="col-xs-9">
@ -8,7 +8,7 @@
</div>
<div class="col-xs-3">
<div class="input-group">
<input type="text" class="form-control input-sm" name="{{$field.0}}" id="{{$field.0}}" value="{{$field.2}}" onchange="{{$field.0}}_range.value = this.value" oninput="{{$field.0}}_range.value = this.value" aria-describedby="{{$field.0}}_tip">
<input type="text" class="form-control input-sm" name="{{$field.0}}" id="{{$field.0}}" value="{{$field.2}}"{{if $field.4}} required{{/if}} onchange="{{$field.0}}_range.value = this.value" oninput="{{$field.0}}_range.value = this.value" aria-describedby="{{$field.0}}_tip">
<span class="input-group-addon image-select">%</span>
</div>
</div>

View File

@ -1,7 +1,7 @@
<div class="field input" id="wrapper_{{$field.0}}">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<input{{if $field.6}} type="{{$field.6}}"{{else}} type="text"{{/if}} name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2}}"{{if $field.4 eq 'required'}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">
<label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<input type="{{$field.6|default:'text'}}" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2}}"{{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">
{{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}

View File

@ -1,8 +1,8 @@
<div class='field password' id='wrapper_{{$field.0}}'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<input type='password' name='{{$field.0}}' id='id_{{$field.0}}' value="{{$field.2 nofilter}}"{{if $field.4 eq 'required'}} required{{/if}}{{if $field.5 eq 'autofocus'}} autofocus{{/if}} aria-describedby='{{$field.0}}_tip'>
<div class="field password" id="wrapper_{{$field.0}}">
<label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<input type="password" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}"{{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{/if}} aria-describedby="{{$field.0}}_tip">
{{if $field.3}}
<span class='field_help' role='tooltip' id='{{$field.0}}_tip'>{{$field.3 nofilter}}</span>
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}
</div>

View File

@ -1,9 +0,0 @@
<div class='field richtext'>
<label for='id_{{$field.0}}'>{{$field.1}}</label>
<textarea name='{{$field.0}}' id='id_{{$field.0}}' class="fieldRichtext" aria-describedby='{{$field.0}}_tip'>{{$field.2 nofilter}}</textarea>
{{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}
</div>

View File

@ -1,7 +1,7 @@
<div class="field textarea">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<textarea name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip"{{if $field.4 eq 'required'}} required{{/if}}>{{$field.2}}</textarea>
<label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<textarea name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
{{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}

View File

@ -7,15 +7,6 @@
{{$info_03}}
</p>
<table>
{{foreach $checks as $check}}
<tr><td>{{$check.title}} </td><td>
{{if ! $check.status}}
<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
{{/if}}
{{/foreach}}
</table>
<form id="install-form" action="{{$baseurl}}/install" method="post">
<input type="hidden" name="config-php_path" value="{{$php_path}}" />

View File

@ -6,20 +6,20 @@
{{foreach $checks as $check}}
<tr><td>{{$check.title nofilter}} </td><td>
{{if $check.status}}
<img src="{{$baseurl}}/view/install/green.png" alt="Ok">
<img src="{{$baseurl}}/view/install/green.png" alt="{{$ok}}">
{{else}}
{{if $check.required}}
<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
{{else}}
<img src="{{$baseurl}}/view/install/yellow.png" alt="Optional requirement not satisfied">
<img src="{{$baseurl}}/view/install/yellow.png" alt="{{$optional_requirement_not_satisfied}}">
{{/if}}
{{/if}}
</td><td>{{if $check.required}}(required){{/if}}</td></tr>
</td><td>{{if $check.required}}{{$required}}{{/if}}</td></tr>
{{if $check.help}}
<tr><td class="help" colspan="3">
<blockquote>{{$check.help nofilter}}</blockquote>
{{if $check.error_msg}}
<div class="error_header"><b>{{$check.error_msg.head}}</br><a href="{{$check.error_msg.url}}">{{$check.error_msg.url}}</a></b></div>
<div class="error_header"><b>{{$check.error_msg.head}}<br><a href="{{$check.error_msg.url}}">{{$check.error_msg.url}}</a></b></div>
<blockquote>{{$check.error_msg.msg}}</blockquote>
{{/if}}
</td></tr>

View File

@ -9,10 +9,13 @@
<table>
{{foreach $checks as $check}}
<tr><td>{{$check.title}} </td><td>
<tr>
<td>{{$check.title}} </td>
<td>
{{if ! $check.status}}
<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
{{/if}}
</td>
{{/foreach}}
</table>

View File

@ -2,7 +2,7 @@
<h2>{{$pass}}</h2>
{{foreach $checks as $check}}
<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
{{$check.title nofilter}}
<textarea rows="24" cols="80">{{$check.help nofilter}}</textarea>
{{/foreach}}

View File

@ -102,7 +102,7 @@
<fieldset class="panel-body">
<label for="viewas-select">{{$view_as}}</label>
<select name="viewas" id="viewas-select" class="form-control">
<option value="0">Yourself</option>
<option value="0">{{$yourself}}</option>
{{foreach $view_as_contacts as $contact}}
<option value="{{$contact.id}}"{{if $contact.id == $view_as_contact_id}} selected{{/if}}>{{$contact.name}}</option>
{{/foreach}}

View File

@ -1,10 +1,9 @@
<div class="form-group field input color">
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label>
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<div class="input-group" id="{{$field.0}}">
<span class="input-group-addon"><i></i></span>
<input class="form-control color" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
{{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}}
<input class="form-control color" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2 nofilter}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip">
</div>
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>

View File

@ -1,9 +1,8 @@
<div class="form-group field input file">
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label>
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<div class="input-group" id="{{$field.0}}">
<input class="form-control file" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
{{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}}
<input class="form-control file" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2 nofilter}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip">
<span class="input-group-addon image-select"><i class="fa fa-picture-o"></i></span>
</div>
{{if $field.3}}

View File

@ -1,9 +1,9 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input">
{{if !isset($label) || $label != false }}
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1 nofilter}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1 nofilter}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
{{/if}}
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.6}} type="{{$field.6}}"{{else}} type="text"{{/if}} value="{{$field.2}}"{{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="{{$field.6|default:'text'}}" value="{{$field.2}}"{{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}}

View File

@ -1,7 +1,7 @@
<div id="id_{{$field.0}}_wrapper" class="form-group field input password">
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="password" value="{{$field.2 nofilter}}" {{if $field.4 eq "required"}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip">
<label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="password" value="{{$field.2 nofilter}}" {{if $field.4}} required{{/if}}{{if $field.5 eq "autofocus"}} autofocus{{elseif $field.5}} {{$field.5}}{{/if}} aria-describedby="{{$field.0}}_tip">
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}}

View File

@ -1,8 +1,8 @@
<div class="form-group field textarea">
{{if $field.1}}
<label for="id_{{$field.0}}">{{$field.1}}</label>
<label for="id_{{$field.0}}">{{$field.1}}{{if $field.4}} <span class="required" title="{{$field.4}}">*</span>{{/if}}</label>
{{/if}}
<textarea class="form-control text-autosize" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.4}}{{$field.4 nofilter}}{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
<textarea class="form-control text-autosize" name="{{$field.0}}" id="id_{{$field.0}}"{{if $field.4}} required{{/if}} aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}}