mirror of https://github.com/zulip/zulip.git
invite-user-modal: Add general class names for improved extensibility.
Adds general class names in invite_user_modal.hbs for custom time the input and unit so that these elements more easily be extended for use in other modals with a user specified custom time. Updates the listener in invite.ts that was using the removed "custom-expiration-time" class to instead use the id for the input and unit div, "custom-invite-expiration-time". Corresponding updates have been made to the relevant CSS files to ensure consistent styling and future scalability. Co-authored-by: Ujjawal Modi <umodi2003@gmail.com> Co-authored-by: Lauryn Menard <lauryn@zulip.com>
This commit is contained in:
parent
bc0f9c4876
commit
523dc7e2be
|
@ -451,7 +451,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent<Document, undefined>): void
|
|||
}
|
||||
});
|
||||
|
||||
$(".custom-expiration-time").on("change", () => {
|
||||
$("#custom-invite-expiration-time").on("change", () => {
|
||||
custom_expiration_time_input = util.check_time_input(
|
||||
$<HTMLInputElement>("input#custom-expiration-time-input").val()!,
|
||||
);
|
||||
|
|
|
@ -342,7 +342,7 @@
|
|||
select,
|
||||
.pill-container,
|
||||
.user-status-content-wrapper,
|
||||
#custom-expiration-time-input,
|
||||
.custom-time-input-value,
|
||||
#organization-permissions .dropdown-widget-button,
|
||||
#organization-settings .dropdown-widget-button,
|
||||
#stream-advanced-configurations .dropdown-widget-button {
|
||||
|
|
|
@ -1261,7 +1261,7 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
|
|||
}
|
||||
}
|
||||
|
||||
#custom-expiration-time-input,
|
||||
.custom-time-input-value,
|
||||
#invite-user-form {
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -1285,7 +1285,7 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
#custom-expiration-time-input {
|
||||
.custom-time-input-value {
|
||||
width: 5ch;
|
||||
margin-right: 15px;
|
||||
|
||||
|
@ -1307,7 +1307,7 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
|
|||
}
|
||||
}
|
||||
|
||||
#custom-expiration-time-unit {
|
||||
.custom-time-input-unit {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
<p id="expires_on"></p>
|
||||
<div id="custom-invite-expiration-time" class="dependent-settings-block">
|
||||
<label for="expires_in" class="modal-field-label">{{t "Custom time" }}</label>
|
||||
<input type="text" autocomplete="off" name="custom-expiration-time" id="custom-expiration-time-input" class="custom-expiration-time inline-block" value="" maxlength="3"/>
|
||||
<select class="custom-expiration-time invite-user-select modal_select bootstrap-focus-style" id="custom-expiration-time-unit">
|
||||
<input type="text" autocomplete="off" name="custom-expiration-time" id="custom-expiration-time-input" class="custom-time-input-value inline-block" value="" maxlength="3"/>
|
||||
<select class="custom-time-input-unit invite-user-select modal_select bootstrap-focus-style" id="custom-expiration-time-unit">
|
||||
{{#each time_choices}}
|
||||
<option name="custom_time_choice" class="custom_time_choice" value="{{this.name}}">{{this.description}}</option>
|
||||
{{/each}}
|
||||
|
|
Loading…
Reference in New Issue