mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
custom_profile_fields: Change class from control-group to input-group.
This is a preparatory commit for commit "Edit custom profile field form into modal." Above mentioned commit will use class input-group instead of control-group so here we are already changing it to input-group.
This commit is contained in:
committed by
Tim Abbott
parent
d0f5b38f65
commit
c60cdc46e3
@@ -147,8 +147,8 @@ function create_choice_row(container) {
|
||||
}
|
||||
|
||||
function clear_form_data() {
|
||||
$("#profile_field_name").val("").closest(".control-group").show();
|
||||
$("#profile_field_hint").val("").closest(".control-group").show();
|
||||
$("#profile_field_name").val("").closest(".input-group").show();
|
||||
$("#profile_field_hint").val("").closest(".input-group").show();
|
||||
// Set default type "Short text" in field type dropdown
|
||||
$("#profile_field_type").val(field_types.SHORT_TEXT.id);
|
||||
// Clear data from select field form
|
||||
@@ -173,16 +173,16 @@ function set_up_create_field_form() {
|
||||
$field_elem.show();
|
||||
if ($("#profile_field_external_accounts_type").val() === "custom") {
|
||||
$field_url_pattern_elem.show();
|
||||
$("#profile_field_name").val("").closest(".control-group").show();
|
||||
$("#profile_field_hint").val("").closest(".control-group").show();
|
||||
$("#profile_field_name").val("").closest(".input-group").show();
|
||||
$("#profile_field_hint").val("").closest(".input-group").show();
|
||||
} else {
|
||||
$field_url_pattern_elem.hide();
|
||||
$("#profile_field_name").closest(".control-group").hide();
|
||||
$("#profile_field_hint").closest(".control-group").hide();
|
||||
$("#profile_field_name").closest(".input-group").hide();
|
||||
$("#profile_field_hint").closest(".input-group").hide();
|
||||
}
|
||||
} else {
|
||||
$("#profile_field_name").closest(".control-group").show();
|
||||
$("#profile_field_hint").closest(".control-group").show();
|
||||
$("#profile_field_name").closest(".input-group").show();
|
||||
$("#profile_field_hint").closest(".input-group").show();
|
||||
$field_url_pattern_elem.hide();
|
||||
$field_elem.hide();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="new-profile-field-form wrapper">
|
||||
<div class="settings-section-title new-profile-field-section-title inline-block">{{t "Add a new profile field" }}</div>
|
||||
<div class="alert-notification" id="admin-add-profile-field-status"></div>
|
||||
<div class="control-group">
|
||||
<div class="input-group">
|
||||
<label for="profile_field_type" class="control-label">{{t "Type" }}</label>
|
||||
<select id="profile_field_type" name="field_type">
|
||||
{{#each custom_profile_field_types}}
|
||||
@@ -29,7 +29,7 @@
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="control-group" id="profile_field_external_accounts">
|
||||
<div class="input-group" id="profile_field_external_accounts">
|
||||
<label for="profile_field_external_accounts_type" class="control-label">{{t "External account type" }}</label>
|
||||
<select id="profile_field_external_accounts_type" name="external_acc_field_type">
|
||||
{{#each realm_default_external_accounts}}
|
||||
@@ -38,22 +38,22 @@
|
||||
<option value="custom">{{t 'Custom' }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="input-group">
|
||||
<label for="profile_field_name" class="control-label">{{t "Label" }}</label>
|
||||
<input type="text" id="profile_field_name" name="name" autocomplete="off" maxlength="40" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="input-group">
|
||||
<label for="profile_field_hint" class="control-label">{{t "Hint (up to 80 characters)" }}</label>
|
||||
<input type="text" id="profile_field_hint" name="hint" autocomplete="off" maxlength="80" />
|
||||
<div class="alert" id="admin-profile-field-hint-status"></div>
|
||||
</div>
|
||||
<div class="control-group" id="profile_field_choices_row">
|
||||
<div class="input-group" id="profile_field_choices_row">
|
||||
<label for="profile_field_choices" class="control-label">{{t "Field choices" }}</label>
|
||||
<table class="profile_field_choices_table">
|
||||
<tbody id="profile_field_choices" class="profile-field-choices"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="control-group" id="custom_external_account_url_pattern">
|
||||
<div class="input-group" id="custom_external_account_url_pattern">
|
||||
<label for="custom_field_url_pattern" class="control-label">{{t "URL pattern" }}</label>
|
||||
<input type="url" id="custom_field_url_pattern" name="url_pattern" autocomplete="off" maxlength="1024" placeholder="https://example.com/path/%(username)s"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user