mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
slack_import: Disable submit button if file is invalid.
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
<div class="not-editable-realm-field" id="slack-import-uploaded-file-name">{{ uploaded_import_file_name }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<button type="submit" class="register-button">
|
||||
<button type="submit" class="register-button"{% if invalid_file_error_message %} disabled{% endif %}>
|
||||
{{ _("Start import") }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -457,6 +457,7 @@ $(() => {
|
||||
$("#slack-import-start-upload-wrapper").removeClass("hidden");
|
||||
$("#slack-import-uploaded-file-name").text(file.name!);
|
||||
$("#slack-import-file-upload-error").text("");
|
||||
$("#realm-creation-form-slack-import .register-button").prop("disabled", false);
|
||||
});
|
||||
// Reset uppy state to allow user replace existing uploaded file.
|
||||
uppy.on("complete", () => {
|
||||
|
@@ -1568,3 +1568,10 @@ button#register_auth_button_gitlab {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
#realm-creation-form-slack-import .register-button {
|
||||
&[disabled] {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user