|
@@ -1413,6 +1413,16 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
|
|
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
|
|
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
|
|
|
}
|
|
|
+ case "add_client_submit_enable":
|
|
|
+ client_Enable = true
|
|
|
+ _, err := t.SubmitAddClient()
|
|
|
+ if err != nil {
|
|
|
+ errorMessage := fmt.Sprintf("%v", err)
|
|
|
+ t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.messages.error_add_client", "error=="+errorMessage), tu.ReplyKeyboardRemove())
|
|
|
+ } else {
|
|
|
+ t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
|
|
+ t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2216,6 +2226,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
|
|
),
|
|
|
tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
|
|
+ tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
|
|
+ ),
|
|
|
+ tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
|
|
),
|
|
|
)
|
|
@@ -2239,6 +2252,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
|
|
),
|
|
|
tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
|
|
+ tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
|
|
+ ),
|
|
|
+ tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
|
|
),
|
|
|
)
|
|
@@ -2262,6 +2278,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
|
|
),
|
|
|
tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
|
|
+ tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
|
|
+ ),
|
|
|
+ tu.InlineKeyboardRow(
|
|
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
|
|
),
|
|
|
)
|